mirror of
https://github.com/snowykami/neo-blog.git
synced 2025-09-26 19:16:24 +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
|
return errs.ErrForbidden
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user