perf: 登录支持双重认证

This commit is contained in:
xiaojunnuo
2025-04-17 22:34:21 +08:00
parent 8e50e5dee3
commit 48aef25b3f
16 changed files with 132 additions and 55 deletions
@@ -1,5 +1,6 @@
import { Constants } from '../constants.js';
import { BaseException } from './base-exception.js';
import { TextException } from "./common-exception.js";
/**
* 授权异常
*/
@@ -10,9 +11,9 @@ export class AuthException extends BaseException {
}
export class Need2FAException extends BaseException {
constructor(message?:string) {
super('Need2FAException', Constants.res.need2fa.code, message ? message : Constants.res.need2fa.message);
export class Need2FAException extends TextException {
constructor(message:string,data:any) {
super('Need2FAException', Constants.res.need2fa.code, message ? message : Constants.res.need2fa.message,data);
}
}