This commit is contained in:
xiaojunnuo
2024-09-24 02:42:08 +08:00
parent 154f627f2a
commit 92aa4a6d63
12 changed files with 169 additions and 11 deletions
@@ -38,6 +38,18 @@ export class SysPlusController extends BaseController {
await this.plusService.updateLicense(siteId, license);
return this.ok(true);
}
@Post('/bindUrl', { summary: 'sys:settings:edit' })
async bindUrl(@Body(ALL) body: { url: string }) {
const { url } = body;
const installInfo: SysInstallInfo = await this.sysSettingsService.getSetting(SysInstallInfo);
await this.plusService.bindUrl(installInfo.siteId, url);
installInfo.bindUrl = url;
await this.sysSettingsService.saveSetting(installInfo);
return this.ok(true);
}
}