fix: 获取个人中心用户信息用户ID从上下文获取而非传参

Signed-off-by: 郝先瑞 <1490493387@qq.com>
This commit is contained in:
郝先瑞
2024-08-23 07:30:03 +00:00
committed by Gitee
parent 0922880a49
commit cf494ed306

View File

@@ -163,10 +163,9 @@ public class SysUserController {
}
@Operation(summary = "获取个人中心用户信息")
@GetMapping("/{userId}/profile")
public Result<UserProfileVO> getUserProfile(
@Parameter(description = "用户ID") @PathVariable Long userId
) {
@GetMapping("/profile")
public Result<UserProfileVO> getUserProfile() {
Long userId = SecurityUtils.getUserId();
UserProfileVO userProfile = userService.getUserProfile(userId);
return Result.success(userProfile);
}