Can request consumption history

This commit is contained in:
2024-09-25 22:31:00 +02:00
parent 821b4644a2
commit 2e72634abf
3 changed files with 56 additions and 0 deletions

View File

@ -131,10 +131,18 @@ pub async fn secure_server(energy_actor: EnergyActorAddr) -> anyhow::Result<()>
"/web_api/energy/curr_consumption",
web::get().to(energy_controller::curr_consumption),
)
.route(
"/web_api/energy/curr_consumption/history",
web::get().to(energy_controller::curr_consumption_history),
)
.route(
"/web_api/energy/cached_consumption",
web::get().to(energy_controller::cached_consumption),
)
.route(
"/web_api/energy/relays_consumption/history",
web::get().to(energy_controller::relays_consumption_history),
)
// Devices controller
.route(
"/web_api/devices/list_pending",