From 6de11f09db7e2357fa987b4f80730b4d03a81e71 Mon Sep 17 00:00:00 2001 From: jude Date: Wed, 21 Jun 2023 15:36:05 +0100 Subject: [PATCH] Change graph periods --- Cargo.lock | 2 +- Cargo.toml | 2 +- web/src/routes/admin.rs | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 785bb2b..9dee118 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2217,7 +2217,7 @@ checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78" [[package]] name = "reminder-rs" -version = "1.6.17" +version = "1.6.17-1" dependencies = [ "base64 0.21.2", "chrono", diff --git a/Cargo.toml b/Cargo.toml index c755df8..2b0f977 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "reminder-rs" -version = "1.6.17" +version = "1.6.17-1" authors = ["Jude Southworth "] edition = "2021" license = "AGPL-3.0 only" diff --git a/web/src/routes/admin.rs b/web/src/routes/admin.rs index cce5c57..8e80d65 100644 --- a/web/src/routes/admin.rs +++ b/web/src/routes/admin.rs @@ -54,7 +54,7 @@ pub async fn bot_data(cookies: &CookieJar<'_>, pool: &State>) -> Jso let schedule_once = sqlx::query_as_unchecked!( TimeFrame, "SELECT - FROM_UNIXTIME(FLOOR(UNIX_TIMESTAMP(`utc_time`) / 600) * 600) AS `time_key`, + FROM_UNIXTIME(FLOOR(UNIX_TIMESTAMP(`utc_time`) / 300) * 300) AS `time_key`, COUNT(1) AS `count` FROM reminders WHERE @@ -74,7 +74,7 @@ pub async fn bot_data(cookies: &CookieJar<'_>, pool: &State>) -> Jso let schedule_interval = sqlx::query_as_unchecked!( TimeFrame, "SELECT - FROM_UNIXTIME(FLOOR(UNIX_TIMESTAMP(`utc_time`) / 600) * 600) AS `time_key`, + FROM_UNIXTIME(FLOOR(UNIX_TIMESTAMP(`utc_time`) / 300) * 300) AS `time_key`, COUNT(1) AS `count` FROM reminders WHERE @@ -99,7 +99,7 @@ pub async fn bot_data(cookies: &CookieJar<'_>, pool: &State>) -> Jso COUNT(1) AS `count` FROM reminders WHERE - `utc_time` < DATE_ADD(NOW(), INTERVAL 14 DAY) AND + `utc_time` < DATE_ADD(NOW(), INTERVAL 31 DAY) AND `utc_time` >= NOW() AND `enabled` = 1 AND `interval_seconds` IS NULL AND @@ -119,7 +119,7 @@ pub async fn bot_data(cookies: &CookieJar<'_>, pool: &State>) -> Jso COUNT(1) AS `count` FROM reminders WHERE - `utc_time` < DATE_ADD(NOW(), INTERVAL 14 DAY) AND + `utc_time` < DATE_ADD(NOW(), INTERVAL 31 DAY) AND `utc_time` >= NOW() AND `enabled` = 1 AND ( `interval_seconds` IS NOT NULL OR