mirror of
https://github.com/certd/certd.git
synced 2026-04-23 11:37:23 +08:00
build: trident-sync prepare
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
import {
|
||||
ALL,
|
||||
Controller,
|
||||
Inject,
|
||||
Post,
|
||||
Provide,
|
||||
Query,
|
||||
} from '@midwayjs/decorator';
|
||||
import { BaseController } from '../../../basic/base-controller';
|
||||
import { PluginService } from '../service/plugin-service';
|
||||
|
||||
/**
|
||||
* 插件
|
||||
*/
|
||||
@Provide()
|
||||
@Controller('/api/pi/plugin')
|
||||
export class PluginController extends BaseController {
|
||||
@Inject()
|
||||
service: PluginService;
|
||||
|
||||
@Post('/list')
|
||||
async list(@Query(ALL) query) {
|
||||
query.userId = this.ctx.user.id;
|
||||
const list = this.service.getList();
|
||||
return this.ok(list);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user