mirror of
https://github.com/certd/certd.git
synced 2026-07-07 13:07:36 +08:00
perf: EAB授权支持绑定邮箱,支持公共EAB设置
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import { Inject, Provide, Scope, ScopeEnum } from '@midwayjs/core';
|
||||
import { IPluginConfigService, PluginConfig } from '@certd/pipeline';
|
||||
import { PluginConfigService } from './plugin-config-service.js';
|
||||
|
||||
@Provide()
|
||||
@Scope(ScopeEnum.Singleton)
|
||||
export class PluginConfigGetter implements IPluginConfigService {
|
||||
@Inject()
|
||||
pluginConfigService: PluginConfigService;
|
||||
|
||||
async getPluginConfig(pluginName: string): Promise<PluginConfig> {
|
||||
const res = await this.pluginConfigService.getPluginConfig({
|
||||
name: pluginName,
|
||||
type: 'builtIn',
|
||||
});
|
||||
return {
|
||||
name: res.name,
|
||||
disabled: res.disabled,
|
||||
sysSetting: res.sysSetting,
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user