获得所有字典类型

This commit is contained in:
COOL 2025-02-05 13:19:18 +08:00
parent 2a46307d9a
commit 230b989415

View File

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