Skip to content

Commit

Permalink
Merge pull request #516 from rathoreyuvraj19/feature/bug510
Browse files Browse the repository at this point in the history
Fixed bug #510
  • Loading branch information
hkirat authored May 12, 2024
2 parents 92db970 + 621d286 commit 051db4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/actions/comment/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ const deleteCommentHandler = async (
}

if (
session.user?.role !== ROLES.ADMIN ||
session.user?.role !== ROLES.ADMIN &&
existingComment.userId !== userId
) {
return { error: 'Unauthorized to delete this comment.' };
Expand Down

0 comments on commit 051db4d

Please sign in to comment.