mirror of
https://github.com/ckaczor/HomeMonitor.git
synced 2026-01-23 01:25:39 -05:00
Rework wind history API
This commit is contained in:
@@ -44,16 +44,10 @@ namespace ChrisKaczor.HomeMonitor.Weather.Service.Controllers
|
||||
return (await _database.GetReadingHistoryGrouped(start, end, bucketMinutes)).ToList();
|
||||
}
|
||||
|
||||
[HttpGet("wind-speed-history-grouped")]
|
||||
public async Task<ActionResult<List<WindSpeedReadingGrouped>>> GetWindSpeedHistoryGrouped(DateTimeOffset start, DateTimeOffset end, int bucketMinutes = 2)
|
||||
[HttpGet("wind-history-grouped")]
|
||||
public async Task<ActionResult<List<WindHistoryGrouped>>> GetWindHistoryGrouped(DateTimeOffset start, DateTimeOffset end, int bucketMinutes = 60)
|
||||
{
|
||||
return (await _database.GetWindSpeedHistoryGrouped(start, end, bucketMinutes)).ToList();
|
||||
}
|
||||
|
||||
[HttpGet("wind-direction-history-grouped")]
|
||||
public async Task<ActionResult<List<WindDirectionReadingGrouped>>> GetWindDirectionHistoryGrouped(DateTimeOffset start, DateTimeOffset end)
|
||||
{
|
||||
return (await _database.GetWindDirectionHistoryGrouped(start, end)).ToList();
|
||||
return (await _database.GetWindHistoryGrouped(start, end, bucketMinutes)).ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user