Change graph periods
This commit is contained in:
parent
284bfcd9ad
commit
6de11f09db
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -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",
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "reminder-rs"
|
||||
version = "1.6.17"
|
||||
version = "1.6.17-1"
|
||||
authors = ["Jude Southworth <judesouthworth@pm.me>"]
|
||||
edition = "2021"
|
||||
license = "AGPL-3.0 only"
|
||||
|
@ -54,7 +54,7 @@ pub async fn bot_data(cookies: &CookieJar<'_>, pool: &State<Pool<MySql>>) -> 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<Pool<MySql>>) -> 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<Pool<MySql>>) -> 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<Pool<MySql>>) -> 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
|
||||
|
Loading…
Reference in New Issue
Block a user