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()); + } }