diff options
Diffstat (limited to 'src/Enmarcha.Backend/Controllers/Backoffice/AlertsApiController.cs')
| -rw-r--r-- | src/Enmarcha.Backend/Controllers/Backoffice/AlertsApiController.cs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/Enmarcha.Backend/Controllers/Backoffice/AlertsApiController.cs b/src/Enmarcha.Backend/Controllers/Backoffice/AlertsApiController.cs new file mode 100644 index 0000000..fe425d4 --- /dev/null +++ b/src/Enmarcha.Backend/Controllers/Backoffice/AlertsApiController.cs @@ -0,0 +1,14 @@ +using Enmarcha.Backend.Services; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; + +namespace Enmarcha.Backend.Controllers.Backoffice; + +[Route("backoffice/api")] +[Authorize(AuthenticationSchemes = "Backoffice")] +public class AlertsApiController(BackofficeSelectorService selectors) : ControllerBase +{ + [HttpGet("selectors/transit")] + public async Task<IActionResult> GetTransit() => + Ok(await selectors.GetTransitDataAsync()); +} |
