chore: 修改权限判断字段从summary改成description

This commit is contained in:
xiaojunnuo
2026-03-15 16:20:20 +08:00
parent b88ee33ae4
commit 25e361b9f9
60 changed files with 385 additions and 385 deletions
@@ -21,14 +21,14 @@ export class UserTwoFactorSettingController extends BaseController {
@Post("/get", { summary: Constants.per.authOnly })
@Post("/get", { description: Constants.per.authOnly })
async get() {
const userId = this.getUserId();
const setting = await this.service.getSetting<UserTwoFactorSetting>(userId,null, UserTwoFactorSetting);
return this.ok(setting);
}
@Post("/save", { summary: Constants.per.authOnly })
@Post("/save", { description: Constants.per.authOnly })
async save(@Body(ALL) bean: any) {
if (!isPlus()) {
throw new Error('本功能需要开通专业版')
@@ -47,14 +47,14 @@ export class UserTwoFactorSettingController extends BaseController {
return this.ok({});
}
@Post("/authenticator/qrcode", { summary: Constants.per.authOnly })
@Post("/authenticator/qrcode", { description: Constants.per.authOnly })
async authenticatorQrcode() {
const userId = this.getUserId();
const {qrcode,link,secret} = await this.twoFactorService.getAuthenticatorQrCode(userId);
return this.ok({qrcode,link,secret});
}
@Post("/authenticator/save", { summary: Constants.per.authOnly })
@Post("/authenticator/save", { description: Constants.per.authOnly })
async authenticatorSave(@Body(ALL) bean: any) {
if (!isPlus()) {
throw new Error('本功能需要开通专业版')
@@ -67,7 +67,7 @@ export class UserTwoFactorSettingController extends BaseController {
return this.ok();
}
@Post("/authenticator/off", { summary: Constants.per.authOnly })
@Post("/authenticator/off", { description: Constants.per.authOnly })
async authenticatorOff() {
const userId = this.getUserId();
await this.twoFactorService.offAuthenticator(userId);