mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-09-11 06:57:12 +08:00
refactor: 修改头像接口调整为 Patch 请求方式
This commit is contained in:
@@ -72,7 +72,7 @@ public class UserProfileController {
|
||||
private final AuthRequestFactory authRequestFactory;
|
||||
|
||||
@Operation(summary = "修改头像", description = "用户修改个人头像")
|
||||
@PostMapping("/avatar")
|
||||
@PatchMapping("/avatar")
|
||||
public AvatarResp updateAvatar(@NotNull(message = "头像不能为空") MultipartFile avatarFile) throws IOException {
|
||||
ValidationUtils.throwIf(avatarFile::isEmpty, "头像不能为空");
|
||||
String newAvatar = userService.updateAvatar(avatarFile, UserContextHolder.getUserId());
|
||||
|
Reference in New Issue
Block a user