Skip to content

Commit

Permalink
Minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
tanish35 committed Oct 15, 2024
1 parent c986d7f commit 580bec3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions backend/src/controllers/postController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ const deletePost = asyncHandler(async (req: Request, res: Response) => {
if (post.User.user_id !== user_id) {
return res.status(401).json({ message: "Unauthorized" });
}
// @ts-ignore
await prisma.$transaction(async (prisma) => {
await prisma.comment.deleteMany({
where: { post_id: postId },
Expand Down

0 comments on commit 580bec3

Please sign in to comment.