Further improvements on the open hours endpoints

This commit is contained in:
2026-02-24 21:52:16 +02:00
parent 082eb2575e
commit bc4c849590
11 changed files with 425 additions and 18 deletions

View File

@@ -11,18 +11,18 @@ public static class SystemEndpoints
})
.WithName("GetVersion");
app.MapGet("/health/db", async (SqliteConnection connection) =>
app.MapGet("/health/db", async (Microsoft.Data.Sqlite.SqliteConnection connection) =>
{
await connection.OpenAsync();
await using var command = connection.CreateCommand();
command.CommandText = "SELECT 1";
var result = await command.ExecuteScalarAsync();
return Results.Ok(new
return new
{
Database = "ok",
Result = result
});
};
})
.WithName("GetDatabaseHealth");
}