mirror of
https://github.com/certd/certd.git
synced 2026-05-16 21:27:34 +08:00
chore: oauth-second
This commit is contained in:
@@ -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 || "",
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user