feat: 支持vip转移

This commit is contained in:
xiaojunnuo
2024-09-23 14:04:33 +08:00
parent e85b4da2e3
commit 361e8fe7ae
12 changed files with 104 additions and 55 deletions
@@ -26,8 +26,9 @@ export class BasicController extends BaseController {
public async preBindUser(@Body(ALL) body: PreBindUserReq) {
const installInfo: SysInstallInfo = await this.sysSettingsService.getSetting(SysInstallInfo);
// 设置缓存内容
await this.plusService.request({
await this.plusService.requestWithoutSign({
url: '/activation/subject/preBind',
method: 'POST',
data: {
userId: body.userId,
appKey: AppKey,
@@ -53,4 +54,11 @@ export class BasicController extends BaseController {
await this.sysSettingsService.saveSetting(installInfo);
return this.ok({});
}
@Post('/updateLicense', { summary: 'sys:settings:edit' })
public async updateLicense(@Body(ALL) body: { license: string }) {
const installInfo: SysInstallInfo = await this.sysSettingsService.getSetting(SysInstallInfo);
await this.plusService.updateLicense(installInfo.siteId, body.license);
return this.ok(true);
}
}