Skip to content

Commit 5b2068e

Browse files
committed
fix(comment): fix comments
1 parent 3b13f20 commit 5b2068e

File tree

4 files changed

+19
-253
lines changed

4 files changed

+19
-253
lines changed

package-lock.json

Lines changed: 6 additions & 190 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/auth/dto/wechat-login.dto.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
import { IsString } from 'class-validator';
22

3-
export class WechatQrcodeResponseDto {
4-
@IsString()
5-
state: string;
6-
7-
@IsString()
8-
data: string;
9-
}
10-
113
export class WechatCheckResponseDto {
124
@IsString()
135
status: 'pending' | 'success' | 'expired';

src/auth/wechat.controller.ts

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,15 @@
11
import { WechatService } from './wechat.service';
22
import { Public } from 'src/auth/decorators/public.decorator';
3-
import { Get, Param, Query, Controller } from '@nestjs/common';
4-
import {
5-
WechatQrcodeResponseDto,
6-
WechatCheckResponseDto,
7-
} from './dto/wechat-login.dto';
3+
import { Get, Query, Controller } from '@nestjs/common';
84

95
@Controller('api/v1/wechat')
106
export class WechatController {
117
constructor(private readonly wechatService: WechatService) {}
128

139
@Public()
1410
@Get('qrcode')
15-
getQrCode(): WechatQrcodeResponseDto {
16-
return this.wechatService.generateQrCode();
17-
}
18-
19-
@Public()
20-
@Get('check/:state')
21-
checkStatus(@Param('state') state: string): WechatCheckResponseDto {
22-
return this.wechatService.checkQrCodeStatus(state);
11+
getQrCode() {
12+
return this.wechatService.getQrCodeParams();
2313
}
2414

2515
@Public()

0 commit comments

Comments
 (0)