微信授权逻辑修改
This commit is contained in:
@@ -3,6 +3,7 @@ import type { Request } from 'express';
|
||||
import { AuthService } from './auth.service';
|
||||
import {
|
||||
BindPhoneDto,
|
||||
BindWechatDto,
|
||||
BindWechatPhoneDto,
|
||||
BootstrapSessionDto,
|
||||
LoginSmsDto,
|
||||
@@ -78,6 +79,17 @@ export class UserAuthController {
|
||||
);
|
||||
}
|
||||
|
||||
@Post('auth/wechat/bind')
|
||||
@UseGuards(JwtAuthGuard)
|
||||
bindWechat(@CurrentUser() user: AuthUser, @Body() dto: BindWechatDto) {
|
||||
return this.authService.bindUserWechat(
|
||||
user.actorId,
|
||||
{ code: dto.code, wxSessionKey: dto.wxSessionKey },
|
||||
ClientApp.USER_H5,
|
||||
dto.platform ?? 'h5',
|
||||
);
|
||||
}
|
||||
|
||||
@Get('auth/me')
|
||||
@UseGuards(JwtAuthGuard)
|
||||
me(@CurrentUser() user: AuthUser) {
|
||||
|
||||
Reference in New Issue
Block a user