Reset intervals correctly
This commit is contained in:
parent
17192b0f89
commit
a476f43f28
@ -1 +1 @@
|
|||||||
Subproject commit 8ba7a39ce532907b845c54dd3b54bf2a4c7a04e9
|
Subproject commit d068782596bb85d883a594633e9b516c1bc428fc
|
@ -235,6 +235,21 @@ pub async fn edit_reminder(
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
sqlx::query!(
|
||||||
|
"
|
||||||
|
UPDATE reminders
|
||||||
|
SET interval_seconds = NULL, interval_days = NULL, interval_months = NULL
|
||||||
|
WHERE uid = ?
|
||||||
|
",
|
||||||
|
reminder.uid
|
||||||
|
)
|
||||||
|
.execute(transaction.executor())
|
||||||
|
.await
|
||||||
|
.map_err(|e| {
|
||||||
|
warn!("Error updating reminder interval: {:?}", e);
|
||||||
|
json!({ "reminder": Option::<Reminder>::None, "errors": vec!["Unknown error"] })
|
||||||
|
})?;
|
||||||
}
|
}
|
||||||
|
|
||||||
if reminder.channel > 0 {
|
if reminder.channel > 0 {
|
||||||
|
Loading…
Reference in New Issue
Block a user