chore: 插件编辑器

This commit is contained in:
xiaojunnuo
2025-04-06 18:06:21 +08:00
parent 61e322678b
commit 840a7b7c73
14 changed files with 731 additions and 305 deletions
@@ -2,6 +2,7 @@ import { ALL, Body, Controller, Inject, Post, Provide, Query } from '@midwayjs/c
import { BaseController, Constants } from '@certd/lib-server';
import { PluginService } from '../../../modules/plugin/service/plugin-service.js';
import { PluginConfigService } from '../../../modules/plugin/service/plugin-config-service.js';
import {pluginGroups} from "@certd/pipeline";
/**
* 插件
@@ -29,6 +30,21 @@ export class PluginController extends BaseController {
return this.ok(group);
}
@Post('/groupsList', { summary: Constants.per.authOnly })
async groupsList(@Query(ALL) query: any) {
query.userId = this.getUserId();
const groups = pluginGroups
const groupsList:any = []
for (const key in groups) {
const group = {
...groups[key]
}
delete group.plugins
groupsList.push(group)
}
return this.ok(groupsList);
}
@Post('/getDefineByType', { summary: Constants.per.authOnly })
async getDefineByType(@Body('type') type: string) {
const define = await this.service.getDefineByType(type);