From 230b989415a3333c085e1c4cd5417600557dadaa Mon Sep 17 00:00:00 2001 From: COOL Date: Wed, 5 Feb 2025 13:19:18 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=BE=97=E6=89=80=E6=9C=89=E5=AD=97?= =?UTF-8?q?=E5=85=B8=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/dict/controller/app/info.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/modules/dict/controller/app/info.ts b/src/modules/dict/controller/app/info.ts index ab82da2..c65fb9a 100644 --- a/src/modules/dict/controller/app/info.ts +++ b/src/modules/dict/controller/app/info.ts @@ -1,4 +1,4 @@ -import { Body, Inject, Post, Provide } from '@midwayjs/core'; +import { Body, Get, Inject, Post, Provide } from '@midwayjs/core'; import { CoolController, BaseController, @@ -23,4 +23,10 @@ export class AppDictInfoController extends BaseController { async data(@Body('types') types: string[] = []) { return this.ok(await this.dictInfoService.data(types)); } + + @CoolTag(TagTypes.IGNORE_TOKEN) + @Get('/types', { summary: '获得所有字典类型' }) + async types() { + return this.ok(await this.dictInfoService.types()); + } }