fix: update comment use incorrect comment id

This commit is contained in:
LinkinStar 2022-11-25 17:14:24 +08:00
parent dd5671d5f9
commit fee838665f
1 changed files with 1 additions and 1 deletions

View File

@ -110,7 +110,7 @@ func (cc *CommentController) UpdateComment(ctx *gin.Context) {
} }
req.UserID = middleware.GetLoginUserIDFromContext(ctx) req.UserID = middleware.GetLoginUserIDFromContext(ctx)
can, err := cc.rankService.CheckOperationPermission(ctx, req.UserID, rank.CommentEditRank, req.UserID) can, err := cc.rankService.CheckOperationPermission(ctx, req.UserID, rank.CommentEditRank, req.CommentID)
if err != nil { if err != nil {
handler.HandleResponse(ctx, err, nil) handler.HandleResponse(ctx, err, nil)
return return