短信验证绑定日志内容
This commit is contained in:
@@ -31,8 +31,14 @@ export class UserAuthController {
|
||||
}
|
||||
|
||||
@Post('auth/sms/send')
|
||||
sendSms(@Body() dto: SendSmsDto) {
|
||||
return this.authService.sendSms(dto.phone, dto.scene);
|
||||
@UseGuards(OptionalJwtAuthGuard)
|
||||
sendSms(@Req() req: Request, @Body() dto: SendSmsDto) {
|
||||
const guest = (req as Request & { user?: AuthUser }).user;
|
||||
const guestId = guest?.actorType === 'USER' ? guest.actorId : undefined;
|
||||
return this.authService.sendSms(dto.phone, dto.scene, {
|
||||
guestUserId: guestId,
|
||||
clientApp: ClientApp.USER_H5,
|
||||
});
|
||||
}
|
||||
|
||||
@Post('auth/login/sms')
|
||||
@@ -85,7 +91,7 @@ export class ShopAuthController {
|
||||
|
||||
@Post('sms/send')
|
||||
sendSms(@Body() dto: SendSmsDto) {
|
||||
return this.authService.sendSms(dto.phone, dto.scene);
|
||||
return this.authService.sendSms(dto.phone, dto.scene, { clientApp: ClientApp.SHOP_H5 });
|
||||
}
|
||||
|
||||
@Post('login/sms')
|
||||
@@ -105,7 +111,7 @@ export class PartnerAuthController {
|
||||
|
||||
@Post('sms/send')
|
||||
sendSms(@Body() dto: SendSmsDto) {
|
||||
return this.authService.sendSms(dto.phone, dto.scene);
|
||||
return this.authService.sendSms(dto.phone, dto.scene, { clientApp: ClientApp.PARTNER_H5 });
|
||||
}
|
||||
|
||||
@Post('login/sms')
|
||||
|
||||
Reference in New Issue
Block a user