diff options
| author | Ariel Costas Guerrero <ariel@costas.dev> | 2026-03-19 18:56:34 +0100 |
|---|---|---|
| committer | Ariel Costas Guerrero <ariel@costas.dev> | 2026-03-19 18:56:34 +0100 |
| commit | bee85bf92aab84087798ffa9f3f16336acef2fce (patch) | |
| tree | 4fc8e2907e6618940cd9bdeb3da1a81172aab459 /src/Enmarcha.Backend/Controllers/Backoffice/BackofficeController.cs | |
| parent | fed5d57b9e5d3df7c34bccb7a120bfa274b2039a (diff) | |
Basic backoffice for alert management
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(); + } +} |
