added routes for listing days & getting days

/api/days?from=...&to=...
/api/day?day=...
This commit is contained in:
2025-10-13 16:32:28 +02:00
parent a34dc18381
commit 6421074931
2 changed files with 54 additions and 18 deletions

View File

@@ -5,7 +5,7 @@ use picoserve::{AppWithStateBuilder, routing::get};
use crate::{
TallyChannel, UsedStore,
webserver::{
api::{add_mapping, get_idevent, get_mapping},
api::{add_mapping, get_day, get_days, get_idevent, get_mapping},
assets::Assets,
},
};
@@ -26,5 +26,7 @@ impl AppWithStateBuilder for AppProps {
picoserve::Router::from_service(Assets)
.route("/api/mapping", get(get_mapping).post(add_mapping))
.route("/api/idevent", get(get_idevent))
.route("/api/days", get(get_days))
.route("/api/day", get(get_day))
}
}