Fix interval updating
This commit is contained in:
parent
666cb7fa2f
commit
fa83fed1af
@ -449,7 +449,7 @@ pub async fn edit_reminder(
|
|||||||
})?
|
})?
|
||||||
.days
|
.days
|
||||||
.unwrap_or(0),
|
.unwrap_or(0),
|
||||||
} + match reminder.interval_months {
|
} * 86400 + match reminder.interval_months {
|
||||||
Some(interval) => interval.unwrap_or(0),
|
Some(interval) => interval.unwrap_or(0),
|
||||||
None => sqlx::query!(
|
None => sqlx::query!(
|
||||||
"SELECT interval_months AS months FROM reminders WHERE uid = ?",
|
"SELECT interval_months AS months FROM reminders WHERE uid = ?",
|
||||||
@ -463,7 +463,7 @@ pub async fn edit_reminder(
|
|||||||
})?
|
})?
|
||||||
.months
|
.months
|
||||||
.unwrap_or(0),
|
.unwrap_or(0),
|
||||||
} + match reminder.interval_seconds {
|
} * 2592000 + match reminder.interval_seconds {
|
||||||
Some(interval) => interval.unwrap_or(0),
|
Some(interval) => interval.unwrap_or(0),
|
||||||
None => sqlx::query!(
|
None => sqlx::query!(
|
||||||
"SELECT interval_seconds AS seconds FROM reminders WHERE uid = ?",
|
"SELECT interval_seconds AS seconds FROM reminders WHERE uid = ?",
|
||||||
|
Loading…
Reference in New Issue
Block a user