小程序修改

This commit is contained in:
2026-07-12 19:44:36 +08:00
parent 3b4833b51a
commit e2dfb08de3
45 changed files with 2028 additions and 347 deletions
@@ -5,6 +5,7 @@ import {
BindPhoneDto,
BindWechatDto,
BindWechatPhoneDto,
MiniWechatProfileDto,
BootstrapSessionDto,
CheckPartnerPhoneDto,
LoginSmsDto,
@@ -96,6 +97,23 @@ export class UserAuthController {
);
}
@Post('auth/wechat/mini-profile')
@UseGuards(JwtAuthGuard)
updateMiniWechatProfile(
@Req() req: Request,
@CurrentUser() user: AuthUser,
@Body() dto: MiniWechatProfileDto,
) {
if (user.actorType !== 'USER') {
throw new BadRequestException('仅用户可更新资料');
}
const clientApp = resolveUserClientApp(req);
if (clientApp !== ClientApp.USER_MINI) {
throw new BadRequestException('仅小程序端可调用');
}
return this.authService.updateMiniWechatProfile(user.actorId, dto);
}
@Get('auth/me')
@UseGuards(JwtAuthGuard)
me(@CurrentUser() user: AuthUser) {