|
|
@@ -1,6 +1,8 @@
|
|
|
-import { Controller, Param, Post } from '@nestjs/common';
|
|
|
+import { Controller, HttpStatus, Param, Post } from '@nestjs/common';
|
|
|
import { NoAuth } from '../../core/decorators/no-auth.decorator';
|
|
|
import { MiniProgramService } from '../service/mini-program.service';
|
|
|
+import { ApiResponse } from '@nestjs/swagger';
|
|
|
+import { TokenVo } from '../../core/vo/token.vo';
|
|
|
|
|
|
@Controller('we-chat')
|
|
|
export class WeChatController {
|
|
|
@@ -8,6 +10,11 @@ export class WeChatController {
|
|
|
|
|
|
@Post('/tokens/:code')
|
|
|
@NoAuth()
|
|
|
+ @ApiResponse({
|
|
|
+ status: HttpStatus.OK,
|
|
|
+ description: 'Token',
|
|
|
+ type: TokenVo,
|
|
|
+ })
|
|
|
async createTokenByCode(@Param('code') code: string) {
|
|
|
return this.miniProgramService.createTokenByCode(code);
|
|
|
}
|