From d152cc0e9b70bdd1abefdf09afc16d48de5d4af4 Mon Sep 17 00:00:00 2001 From: IlhamTahir Date: Mon, 18 Nov 2024 19:20:48 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=A1=A5=E5=85=85=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/we-chat/controller/we-chat.controller.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/we-chat/controller/we-chat.controller.ts b/src/we-chat/controller/we-chat.controller.ts index c73a3b8..145bcd2 100644 --- a/src/we-chat/controller/we-chat.controller.ts +++ b/src/we-chat/controller/we-chat.controller.ts @@ -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); }