fix: user and post deletion

This commit is contained in:
trisua 2025-08-10 12:32:20 -04:00
parent 5a9160f612
commit 7f0cb1f2a1
2 changed files with 4 additions and 2 deletions

View file

@ -543,7 +543,7 @@ impl DataManager {
// delete transfers
let res = execute!(
&conn,
"DELETE FROM transfers WHERE sender = $1 OR receiver = $2",
"DELETE FROM transfers WHERE sender = $1 OR receiver = $1",
&[&(id as i64)]
);

View file

@ -2221,8 +2221,10 @@ impl DataManager {
// decr parent comment count
if let Some(replying_to) = y.replying_to {
if replying_to != 0 {
self.decr_post_comments(replying_to).await.unwrap();
}
}
// decr user post count
let owner = self.get_user_by_id(y.owner).await?;