fix: 修复新部署的无法保存公共eab配置的bug

v2
xiaojunnuo 2025-08-17 19:07:50 +08:00
parent 4c196922fb
commit d5dee75df3
2 changed files with 7 additions and 0 deletions

View File

@ -54,6 +54,7 @@ export class PluginConfigService {
sysSetting: JSON.stringify(sysSetting), sysSetting: JSON.stringify(sysSetting),
type: 'builtIn', type: 'builtIn',
disabled: false, disabled: false,
author: "certd",
}); });
} else { } else {
await this.pluginService.getRepository().update({ name }, { sysSetting: JSON.stringify(sysSetting) }); await this.pluginService.getRepository().update({ name }, { sysSetting: JSON.stringify(sysSetting) });

View File

@ -180,6 +180,12 @@ export class PluginService extends BaseService<PluginEntity> {
throw new Error(`插件${param.author}/${param.name}已存在`); throw new Error(`插件${param.author}/${param.name}已存在`);
} }
if (param.type === "builtIn"){
return await super.add({
...param,
});
}
let plugin: any = {}; let plugin: any = {};
if (param.pluginType === "access") { if (param.pluginType === "access") {
plugin = getDefaultAccessPlugin(); plugin = getDefaultAccessPlugin();