mirror of
https://github.com/certd/certd.git
synced 2026-04-21 10:27:25 +08:00
perf: EAB授权支持绑定邮箱,支持公共EAB设置
This commit is contained in:
@@ -3,6 +3,7 @@ import { merge } from 'lodash-es';
|
||||
import { CrudController } from '@certd/lib-server';
|
||||
import { PluginService } from '../../../modules/plugin/service/plugin-service.js';
|
||||
import { checkComm } from '@certd/pipeline';
|
||||
import { CommPluginConfig, PluginConfigService } from '../../../modules/plugin/service/plugin-config-service.js';
|
||||
|
||||
/**
|
||||
* 插件
|
||||
@@ -13,6 +14,9 @@ export class PluginController extends CrudController<PluginService> {
|
||||
@Inject()
|
||||
service: PluginService;
|
||||
|
||||
@Inject()
|
||||
pluginConfigService: PluginConfigService;
|
||||
|
||||
getService() {
|
||||
checkComm();
|
||||
return this.service;
|
||||
@@ -65,4 +69,15 @@ export class PluginController extends CrudController<PluginService> {
|
||||
await this.service.setDisabled(body);
|
||||
return this.ok();
|
||||
}
|
||||
@Post('/getCommPluginConfigs', { summary: 'sys:settings:edit' })
|
||||
async getCommPluginConfigs() {
|
||||
const res = await this.pluginConfigService.getCommPluginConfig();
|
||||
return this.ok(res);
|
||||
}
|
||||
|
||||
@Post('/saveCommPluginConfigs', { summary: 'sys:settings:edit' })
|
||||
async saveCommPluginConfigs(@Body(ALL) body: CommPluginConfig) {
|
||||
const res = await this.pluginConfigService.saveCommPluginConfig(body);
|
||||
return this.ok(res);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user