refactor(user): 精简用户信息字段并统一接口路径
删除 KeyboardUserReq 中冗余的 email、emailVerified、token 字段; 将 /user/update 改为 /user/updateInfo 并同步更新 Sa-Token 白名单。
This commit is contained in:
@@ -72,7 +72,8 @@ public class SaTokenConfigure implements WebMvcConfigurer {
|
|||||||
"/character/detail",
|
"/character/detail",
|
||||||
"/character/listByTag",
|
"/character/listByTag",
|
||||||
"/user/login",
|
"/user/login",
|
||||||
"/character/listByUser"
|
"/character/listByUser",
|
||||||
|
"/user/updateInfo"
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@Bean
|
@Bean
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ public class UserController {
|
|||||||
return ResultUtils.success(userService.login(userLoginDTO));
|
return ResultUtils.success(userService.login(userLoginDTO));
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/update")
|
@PostMapping("/updateInfo")
|
||||||
@Operation(summary = "更新用户", description = "更新用户接口")
|
@Operation(summary = "更新用户", description = "更新用户接口")
|
||||||
public BaseResponse<Boolean> update(@RequestBody KeyboardUserReq keyboardUserReq) {
|
public BaseResponse<Boolean> update(@RequestBody KeyboardUserReq keyboardUserReq) {
|
||||||
return ResultUtils.success(userService.updateUserInfo(keyboardUserReq));
|
return ResultUtils.success(userService.updateUserInfo(keyboardUserReq));
|
||||||
|
|||||||
@@ -21,22 +21,7 @@ public class KeyboardUserReq {
|
|||||||
@Schema(description="性别")
|
@Schema(description="性别")
|
||||||
private Integer gender;
|
private Integer gender;
|
||||||
|
|
||||||
|
|
||||||
@Schema(description="头像URL")
|
@Schema(description="头像URL")
|
||||||
private String avatarUrl;
|
private String avatarUrl;
|
||||||
|
|
||||||
/**
|
|
||||||
* 邮箱地址
|
|
||||||
*/
|
|
||||||
@Schema(description="邮箱地址")
|
|
||||||
private String email;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 邮箱是否验证
|
|
||||||
*/
|
|
||||||
@Schema(description="邮箱是否验证")
|
|
||||||
private Boolean emailVerified;
|
|
||||||
|
|
||||||
@Schema(description = "token")
|
|
||||||
private String token;
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user