snooze: add UI elements and DB for snooze functionality
This commit is contained in:
@@ -637,6 +637,17 @@ impl MutationRoot {
|
||||
wake_time: DateTime<Utc>,
|
||||
) -> Result<bool, Error> {
|
||||
info!("TODO snooze {query} until {wake_time})");
|
||||
let pool = ctx.data_unchecked::<PgPool>();
|
||||
sqlx::query!(
|
||||
r#"
|
||||
INSERT INTO snooze (message_id, wake)
|
||||
VALUES ($1, $2)
|
||||
"#,
|
||||
query,
|
||||
wake_time
|
||||
)
|
||||
.execute(pool)
|
||||
.await?;
|
||||
Ok(true)
|
||||
}
|
||||
/// Drop and recreate tantivy index. Warning this is slow
|
||||
|
||||
Reference in New Issue
Block a user