云文件系统初始化
This commit is contained in:
@@ -115,12 +115,16 @@ public class UserController {
|
||||
public ResponseEntity<?> updateProfile(
|
||||
@AuthenticationPrincipal UserPrincipal principal,
|
||||
@RequestBody Map<String, String> request) {
|
||||
String nickname = request.get("nickname");
|
||||
String signature = request.get("signature");
|
||||
String phone = request.get("phone");
|
||||
String email = request.get("email");
|
||||
userService.updateProfile(principal.getUserId(), nickname, signature, phone, email);
|
||||
return ResponseEntity.ok(Map.of("message", "更新成功"));
|
||||
try {
|
||||
String nickname = request.get("nickname");
|
||||
String signature = request.get("signature");
|
||||
String phone = request.get("phone");
|
||||
String email = request.get("email");
|
||||
userService.updateProfile(principal.getUserId(), nickname, signature, phone, email);
|
||||
return ResponseEntity.ok(Map.of("message", "更新成功"));
|
||||
} catch (RuntimeException e) {
|
||||
return ResponseEntity.badRequest().body(Map.of("message", e.getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user