Get endpoint for LOK open hours

This commit is contained in:
2026-02-17 21:38:52 +02:00
parent 5e0ed10976
commit 13ca568244
6 changed files with 104 additions and 4 deletions

View File

@@ -0,0 +1,21 @@
public static class LokEndpoints
{
public static void MapLokEndpoints(WebApplication app)
{
app.MapGet("/lok/open-hours", async (LokService lokService) =>
{
var openHours = await lokService.GetOpenHoursAsync();
if (openHours is null)
{
return Results.NotFound(new
{
Message = "Open hours not found."
});
}
return Results.Ok(openHours);
})
.WithName("GetLokOpenHours");
}
}