File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
src/main/kotlin/plus/maa/backend Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ class SecurityConfig(
107107 " /copilot/get/**" ,
108108 " /copilot/rating" ,
109109 " /comments/query" ,
110- " /file/upload " ,
110+ " /comments/rating " ,
111111 " /copilot/ban" ,
112112 " /webhook/**" ,
113113 )
Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ class CommentsAreaController(
6363 @RequireJwt
6464 @PostMapping(" /rating" )
6565 fun ratesComments (@RequestBody commentsRatingDTO : @Valid CommentsRatingDTO ): MaaResult <String > {
66- commentsAreaService.rates(authHelper.userId , commentsRatingDTO)
66+ commentsAreaService.rates(authHelper.obtainUserIdOrIpAddress() , commentsRatingDTO)
6767 return success(" 成功" )
6868 }
6969
Original file line number Diff line number Diff line change @@ -129,13 +129,13 @@ class CommentsAreaService(
129129 * @param userId 登录用户 id
130130 * @param commentsRatingDTO CommentsRatingDTO
131131 */
132- fun rates (userId : Long , commentsRatingDTO : CommentsRatingDTO ) {
132+ fun rates (userId : String , commentsRatingDTO : CommentsRatingDTO ) {
133133 val commentId = commentsRatingDTO.commentId
134134 val commentsArea = requireCommentsAreaById(commentId)
135135
136136 val ratingChange = ratingService.rateComment(
137137 commentId,
138- userId.toString() ,
138+ userId,
139139 RatingType .fromRatingType(commentsRatingDTO.rating),
140140 )
141141 // 更新评分后更新评论的点赞数
You can’t perform that action at this time.
0 commit comments