mirror of
https://github.com/certd/certd.git
synced 2026-04-23 11:37:23 +08:00
chore:
This commit is contained in:
@@ -67,6 +67,14 @@ export class PluginConfigService {
|
||||
async getPluginConfig(req: PluginFindReq) {
|
||||
const plugin = await this.get(req);
|
||||
let sysSetting: any = {};
|
||||
if (!plugin) {
|
||||
return {
|
||||
name: req.name,
|
||||
disabled: false,
|
||||
type: req.type,
|
||||
sysSetting,
|
||||
};
|
||||
}
|
||||
if (plugin && plugin.sysSetting) {
|
||||
sysSetting = JSON.parse(plugin.sysSetting);
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ export class PluginService extends BaseService<PluginEntity> {
|
||||
return records;
|
||||
}
|
||||
|
||||
async setDisabled(opts: { id: number; name: string; type: string; disabled: boolean }) {
|
||||
async setDisabled(opts: { id?: number; name?: string; type: string; disabled: boolean }) {
|
||||
const { id, name, type, disabled } = opts;
|
||||
if (!type) {
|
||||
throw new Error('参数错误: type 不能为空');
|
||||
|
||||
Reference in New Issue
Block a user