Display hours as 0-23 in /stats

This commit is contained in:
2020-11-16 14:25:12 +01:00
parent eaa01709f5
commit accefce65c

View File

@ -216,7 +216,7 @@ pub fn stats(_auth: Authorized, db: State<'_, sled::Db>) -> Result<Template, Sta
bars: (0..24)
.map(|hour| {
let percentage = *stats_per_hour.entry(hour).or_default();
(hour + 1, percentage, 100 - percentage)
(hour, percentage, 100 - percentage)
})
.collect(),
}