From bee85bf92aab84087798ffa9f3f16336acef2fce Mon Sep 17 00:00:00 2001 From: Ariel Costas Guerrero Date: Thu, 19 Mar 2026 18:56:34 +0100 Subject: Basic backoffice for alert management --- .../Controllers/Backoffice/BackofficeController.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/Enmarcha.Backend/Controllers/Backoffice/BackofficeController.cs (limited to 'src/Enmarcha.Backend/Controllers/Backoffice/BackofficeController.cs') 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 Index() + { + ViewData["AlertCount"] = await db.ServiceAlerts.CountAsync(); + return View(); + } +} -- cgit v1.3