Skip to content

Commit

Permalink
fix : add comment model in delete many query for delete post
Browse files Browse the repository at this point in the history
  • Loading branch information
Pedrinvits committed Oct 17, 2024
1 parent bb8a770 commit f1af2c2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions data/deletePost.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ export const deletepost = async (post_id: number) => {
}
}
}),
db.coment.deleteMany({
where : {
post_id
},
}),
db.postLike.deleteMany({
where: {
postId: post_id
Expand Down

0 comments on commit f1af2c2

Please sign in to comment.