aboutsummaryrefslogtreecommitdiff
path: root/src/Enmarcha.Backend/Controllers/Backoffice/AlertsApiController.cs
blob: fe425d45fc7f8057bf0d9f47dca907d7c8b56cc5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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());
}