chore: oauth-second

This commit is contained in:
xiaojunnuo
2025-11-26 23:25:51 +08:00
parent 5a148aa3b9
commit e9427b4694
14 changed files with 306 additions and 47 deletions
@@ -0,0 +1,20 @@
import { SysSettingsService, SysInstallInfo } from "@certd/lib-server";
import { Inject, Provide, Scope, ScopeEnum } from "@midwayjs/core";
import { SiteInfo ,ISiteInfoGetter} from "@certd/plugin-lib";
@Provide("siteInfoGetter")
@Scope(ScopeEnum.Request, { allowDowngrade: true })
export class SiteInfoGetter implements ISiteInfoGetter{
@Inject()
sysSettingsService: SysSettingsService;
async getSiteInfo(): Promise<SiteInfo> {
const installInfo = await this.sysSettingsService.getSetting<SysInstallInfo>(SysInstallInfo);
return {
siteUrl: installInfo?.bindUrl || "",
}
}
}