From fa83fed1af8fb2e8df06769311e0bd80ec59359e Mon Sep 17 00:00:00 2001 From: jude Date: Thu, 3 Aug 2023 19:50:15 +0100 Subject: [PATCH] Fix interval updating --- web/src/routes/dashboard/guild.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/src/routes/dashboard/guild.rs b/web/src/routes/dashboard/guild.rs index 38aa541..817cee7 100644 --- a/web/src/routes/dashboard/guild.rs +++ b/web/src/routes/dashboard/guild.rs @@ -449,7 +449,7 @@ pub async fn edit_reminder( })? .days .unwrap_or(0), - } + match reminder.interval_months { + } * 86400 + match reminder.interval_months { Some(interval) => interval.unwrap_or(0), None => sqlx::query!( "SELECT interval_months AS months FROM reminders WHERE uid = ?", @@ -463,7 +463,7 @@ pub async fn edit_reminder( })? .months .unwrap_or(0), - } + match reminder.interval_seconds { + } * 2592000 + match reminder.interval_seconds { Some(interval) => interval.unwrap_or(0), None => sqlx::query!( "SELECT interval_seconds AS seconds FROM reminders WHERE uid = ?",