anchor-based zoom levels, week separators in chart, UI polish
This commit is contained in:
1 parent
c5ce7c24f7
commit
75b324e388
3 files changed
+112
-17
No files matched your search
@@ -15,6 +15,14 @@ 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 : 4; // 0=Sun, 4=Thu
|
||||
var anchorHour = int.TryParse(config["AnchorHour"], out var h) ? h : 23;
|
||||
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) =>
|
||||
|
||||
Reference in new issue
Block a user