Compare commits

...

4 Commits

Author SHA1 Message Date
74edcfa119 Merge pull request 'fix' (#682) from fix into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 9m11s
CI/CD Pipeline / deploy-staging (push) Successful in 6m44s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #682
2024-08-19 09:55:45 +02:00
cc7bd3a416 maybe unpublishing a post works now?
Some checks failed
CI/CD Pipeline / deploy-staging (push) Has been cancelled
CI/CD Pipeline / deploy-main (push) Has been cancelled
CI/CD Pipeline / test (push) Has been cancelled
2024-08-19 09:55:01 +02:00
bfee85a963 Merge pull request 'send-blogpost-notification' (#680) from send-blogpost-notification into main
All checks were successful
CI/CD Pipeline / test (push) Successful in 9m1s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Successful in 7m21s
Reviewed-on: #680
2024-08-18 22:24:14 +02:00
dea53d8396 Merge pull request 'default-dest-table' (#677) from default-dest-table into main
All checks were successful
CI/CD Pipeline / test (push) Successful in 9m9s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Successful in 6m42s
Reviewed-on: #677
2024-08-18 20:53:10 +02:00
2 changed files with 6 additions and 1 deletions

View File

@ -181,6 +181,7 @@ ORDER BY read_at DESC, created_at DESC;
}
pub(crate) async fn delete_by_link(db: &sqlx::Pool<Sqlite>, link: &str) {
let link = Some(link);
sqlx::query!("DELETE FROM notification WHERE link=?", link)
.execute(db)
.await

View File

@ -161,7 +161,11 @@ async fn blogpost_unpublished(
config: &State<Config>,
) -> String {
if blogpost.pw == &config.wordpress_key {
Notification::delete_by_link(&db, blogpost.article_url).await;
Notification::delete_by_link(
&db,
&urlencoding::decode(blogpost.article_url).expect("UTF-8"),
)
.await;
"ACK".into()
} else {
"WRONG pw".into()