delete notification again, if article is unpublished
Some checks failed
CI/CD Pipeline / deploy-staging (push) Blocked by required conditions
CI/CD Pipeline / deploy-main (push) Blocked by required conditions
CI/CD Pipeline / test (push) Has been cancelled

This commit is contained in:
2024-08-18 22:21:36 +02:00
parent 8efb3aea2c
commit 20da86f69e
2 changed files with 28 additions and 0 deletions

View File

@ -179,6 +179,13 @@ ORDER BY read_at DESC, created_at DESC;
.await
.unwrap();
}
pub(crate) async fn delete_by_link(db: &sqlx::Pool<Sqlite>, link: &str) {
sqlx::query!("DELETE FROM notification WHERE link=?", link)
.execute(db)
.await
.unwrap();
}
}
#[cfg(test)]