mirror of
https://github.com/snowykami/neo-blog.git
synced 2025-09-26 11:06:23 +00:00
fix: 评论删除的条件判断
This commit is contained in:
@ -103,7 +103,7 @@ func (cs *CommentService) DeleteComment(ctx context.Context, commentID string) e
|
||||
}
|
||||
}
|
||||
|
||||
if comment.UserID != currentUser.ID || isTargetOwner {
|
||||
if comment.UserID != currentUser.ID && isTargetOwner {
|
||||
return errs.ErrForbidden
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user