优化插件配置

This commit is contained in:
cool 2024-05-31 17:15:16 +08:00
parent dfcfbb0cba
commit 18c63ba5f9

View File

@ -60,7 +60,13 @@ export class PluginService extends BaseService {
*/
async addOrUpdate(param: any, type?: 'add' | 'update') {
await super.addOrUpdate(param, type);
const info = await this.pluginInfoEntity.findOneBy({ id: param.id });
const info = await this.pluginInfoEntity
.createQueryBuilder('a')
.select(['a.id', 'a.keyName', 'a.status', 'a.hook'])
.where({
id: Equal(param.id),
})
.getOne();
if (info.status == 1) {
await this.reInit(info.keyName);
} else {