aboutsummaryrefslogtreecommitdiff
path: root/src/Enmarcha.Backend/Controllers/Backoffice/BackofficeController.cs
blob: a3c41dc734df501fa9a22e38491e83ef3eceb5f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
using Enmarcha.Backend.Data;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;

namespace Enmarcha.Backend.Controllers.Backoffice;

[Route("backoffice")]
[Authorize(AuthenticationSchemes = "Backoffice")]
public class BackofficeController(AppDbContext db) : Controller
{
    [HttpGet("")]
    public async Task<IActionResult> Index()
    {
        ViewData["AlertCount"] = await db.ServiceAlerts.CountAsync();
        return View();
    }
}