Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions apps/labrinth/src/database/models/user_item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -561,18 +561,18 @@ impl DBUser {

sqlx::query!(
"
DELETE FROM notifications
WHERE user_id = $1
DELETE FROM notifications_actions
WHERE notification_id = ANY($1)
",
id as DBUserId,
&notifications
)
.execute(&mut **transaction)
.await?;

sqlx::query!(
"
DELETE FROM notifications_actions
WHERE notification_id = ANY($1)
DELETE FROM notifications_deliveries
WHERE notification_id = ANY($1)
",
&notifications
)
Expand All @@ -581,10 +581,10 @@ impl DBUser {

sqlx::query!(
"
DELETE FROM notifications_deliveries
WHERE notification_id = ANY($1)
DELETE FROM notifications
WHERE user_id = $1
",
&notifications
id as DBUserId,
)
.execute(&mut **transaction)
.await?;
Expand Down