feat(users): 添加App版本号追踪功能,支持用户版本更新记录

This commit is contained in:
richarjiang
2025-12-02 14:40:59 +08:00
parent 562c66a930
commit 6cdd2bc137
4 changed files with 23 additions and 6 deletions

View File

@@ -68,9 +68,12 @@ export class UsersController {
@ApiOperation({ summary: '获取用户信息' })
@ApiBody({ type: CreateUserDto })
@ApiResponse({ type: UserResponseDto })
async getProfile(@CurrentUser() user: AccessTokenPayload): Promise<UserResponseDto> {
this.logger.log(`get profile: ${JSON.stringify(user)}`);
return this.usersService.getProfile(user);
async getProfile(
@CurrentUser() user: AccessTokenPayload,
@AppVersion() appVersion: string | undefined,
): Promise<UserResponseDto> {
this.logger.log(`get profile: ${JSON.stringify(user)}, appVersion: ${appVersion}`);
return this.usersService.getProfile(user, appVersion);
}
// 获取历史体重记录