Fix interval updating

This commit is contained in:
jude 2023-08-03 19:50:15 +01:00
parent 666cb7fa2f
commit fa83fed1af

View File

@ -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 = ?",