diff options
Diffstat (limited to 'src/Enmarcha.Backend/Controllers/Backoffice/BackofficeController.cs')
| -rw-r--r-- | src/Enmarcha.Backend/Controllers/Backoffice/BackofficeController.cs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/Enmarcha.Backend/Controllers/Backoffice/BackofficeController.cs b/src/Enmarcha.Backend/Controllers/Backoffice/BackofficeController.cs new file mode 100644 index 0000000..a3c41dc --- /dev/null +++ b/src/Enmarcha.Backend/Controllers/Backoffice/BackofficeController.cs @@ -0,0 +1,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(); + } +} |
