mirror of
https://github.com/ckaczor/HomeMonitor.git
synced 2026-01-20 17:23:46 -05:00
Add history endpoint and do some cleanup
This commit is contained in:
@@ -32,4 +32,10 @@ public class ReadingsController(Database database) : ControllerBase
|
||||
|
||||
return Ok(recentReadings);
|
||||
}
|
||||
|
||||
[HttpGet("history-grouped")]
|
||||
public async Task<ActionResult<List<ReadingsGrouped>>> GetHistoryGrouped(DateTimeOffset start, DateTimeOffset end, int bucketMinutes = 5)
|
||||
{
|
||||
return (await database.GetReadingsHistoryGrouped(start, end, bucketMinutes)).ToList();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user