mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-10 17:26:38 +08:00
优化
This commit is contained in:
@@ -111,6 +111,10 @@ export class AuthService extends BaseService {
|
||||
return this.post<User>('/user/register', request);
|
||||
}
|
||||
|
||||
static async sendEmailCode(email: string, scene: 'register' | 'login'): Promise<void> {
|
||||
return this.post<void>('/user/send-email-code', { email, scene });
|
||||
}
|
||||
|
||||
static async changePassword(request: ChangePasswordRequest): Promise<void> {
|
||||
return this.post<void>('/user/change-password', request);
|
||||
}
|
||||
|
||||
@@ -35,12 +35,15 @@ export interface OAuthCallbackRequest {
|
||||
export interface LoginRequest {
|
||||
username: string;
|
||||
password: string;
|
||||
code?: string;
|
||||
}
|
||||
|
||||
export interface RegisterRequest {
|
||||
username: string;
|
||||
password: string;
|
||||
nickname?: string;
|
||||
email?: string;
|
||||
code?: string;
|
||||
}
|
||||
|
||||
export interface OAuthAuthorizeResponse {
|
||||
|
||||
@@ -20,4 +20,8 @@ export interface PublicConfigResponse {
|
||||
cap_login_enabled: boolean;
|
||||
/** 是否自动解题 */
|
||||
cap_auto_solve: boolean;
|
||||
/** 是否启用邮箱登录验证 */
|
||||
email_login_verification_enabled: boolean;
|
||||
/** 是否启用邮箱注册验证 */
|
||||
email_register_verification_enabled: boolean;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user