fix: fix when not upload the user id cannot update user avatar
This commit is contained in:
parent
dabf9c71d1
commit
5a18103854
@ -74,7 +74,7 @@ public class UserController {
|
||||
|
||||
@PutMapping("/avatar")
|
||||
@Operation(description = "修改用户头像")
|
||||
public Result<Boolean> changeAvatar(@RequestParam("code") @Schema(description = "修改头像操作码,可以通过将图片文件上传至([POST] /api/avatar/upload)接口获取") String avatarOperationCode, @Schema(description = "被修改的用户ID", defaultValue = "-1") @RequestParam long userId, @Auth User user) {
|
||||
public Result<Boolean> changeAvatar(@RequestParam("code") @Schema(description = "修改头像操作码,可以通过将图片文件上传至([POST] /api/avatar/upload)接口获取") String avatarOperationCode, @Schema(description = "被修改的用户ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @RequestParam(defaultValue = "-1") long userId, @Auth User user) {
|
||||
return userServices.changeAvatar(avatarOperationCode, userId, user);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user