move anchor config to frontend dropdowns + localStorage, remove /api/settings

This commit is contained in:
Meleki committed 2026-02-22 22:24:44 +01:00
1 parent c245e0e374
commit e2c7adab90
5 files changed
+66 -17

No files matched your search

-8
View File
@@ -15,14 +15,6 @@ var app = builder.Build();
app.UseDefaultFiles();
app.UseStaticFiles();
// GET /api/settings
app.MapGet("/api/settings", (IConfiguration config) =>
{
var anchorDay = int.TryParse(config["AnchorDay"], out var d) ? d : 0;
var anchorHour = int.TryParse(config["AnchorHour"], out var h) ? h : 0;
return Results.Ok(new { anchorDay, anchorHour });
});
// GET /api/cost-buckets?from=&to=&bucketMinutes=
// Returns N buckets of aggregated cost
app.MapGet("/api/cost-buckets", (Func<SqliteConnection> factory, string from, string to, int bucketMinutes) =>