mirror of
https://github.com/certd/certd.git
synced 2026-04-15 21:40:53 +08:00
chore: agent
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { ALL, Body, Config, Controller, Get, Inject, Provide } from '@midwayjs/core';
|
||||
import { BaseController, Constants, SysInstallInfo, SysPublicSettings, SysSettingsService, SysSiteInfo } from '@certd/lib-server';
|
||||
import { BaseController, Constants, SysInstallInfo, SysPublicSettings, SysSettingsService, SysSiteEnv, SysSiteInfo } from '@certd/lib-server';
|
||||
import { AppKey, getPlusInfo } from '@certd/pipeline';
|
||||
|
||||
/**
|
||||
@@ -12,6 +12,9 @@ export class BasicSettingsController extends BaseController {
|
||||
@Config('account.server.baseUrl')
|
||||
accountServerBaseUrl: any;
|
||||
|
||||
@Config('agent')
|
||||
agentConfig: SysSiteEnv['agent'];
|
||||
|
||||
@Get('/public', { summary: Constants.per.guest })
|
||||
public async getSysPublic() {
|
||||
const settings = await this.sysSettingsService.getSetting(SysPublicSettings);
|
||||
@@ -32,6 +35,14 @@ export class BasicSettingsController extends BaseController {
|
||||
return this.ok(settings);
|
||||
}
|
||||
|
||||
@Get('/siteEnv', { summary: Constants.per.guest })
|
||||
public async getSiteEnv() {
|
||||
const env: SysSiteEnv = {
|
||||
agent: this.agentConfig,
|
||||
};
|
||||
return this.ok(env);
|
||||
}
|
||||
|
||||
@Get('/plusInfo', { summary: Constants.per.guest })
|
||||
async plusInfo(@Body(ALL) body: any) {
|
||||
const info = getPlusInfo();
|
||||
|
||||
Reference in New Issue
Block a user