refactor(user): 精简用户信息字段并统一接口路径

删除 KeyboardUserReq 中冗余的 email、emailVerified、token 字段;
将 /user/update 改为 /user/updateInfo 并同步更新 Sa-Token 白名单。
This commit is contained in:
2025-12-03 19:39:26 +08:00
parent 55aba799b5
commit 43d94b2dd9
3 changed files with 3 additions and 17 deletions

View File

@@ -72,7 +72,8 @@ public class SaTokenConfigure implements WebMvcConfigurer {
"/character/detail",
"/character/listByTag",
"/user/login",
"/character/listByUser"
"/character/listByUser",
"/user/updateInfo"
};
}
@Bean

View File

@@ -64,7 +64,7 @@ public class UserController {
return ResultUtils.success(userService.login(userLoginDTO));
}
@PostMapping("/update")
@PostMapping("/updateInfo")
@Operation(summary = "更新用户", description = "更新用户接口")
public BaseResponse<Boolean> update(@RequestBody KeyboardUserReq keyboardUserReq) {
return ResultUtils.success(userService.updateUserInfo(keyboardUserReq));

View File

@@ -21,22 +21,7 @@ public class KeyboardUserReq {
@Schema(description="性别")
private Integer gender;
@Schema(description="头像URL")
private String avatarUrl;
/**
* 邮箱地址
*/
@Schema(description="邮箱地址")
private String email;
/**
* 邮箱是否验证
*/
@Schema(description="邮箱是否验证")
private Boolean emailVerified;
@Schema(description = "token")
private String token;
}