更新用户 API 模型,修正 CaptchaConfig 接口名称并调整相关方法

This commit is contained in:
2025-06-11 00:01:41 +08:00
parent b52b902111
commit a5f9e19d19
2 changed files with 4 additions and 4 deletions

View File

@@ -1,7 +1,7 @@
import client from "./client";
import type { BaseResponse } from "./base.models";
import type {
captchaConfig,
CaptchaConfig,
LoginRequest,
LoginResponse,
RegisterRequest,
@@ -41,6 +41,6 @@ export function getUserOrganizations(userId: number): Promise<AxiosResponse<User
return client.get<UserOrganizationsResponse>(`/user/${userId}/organizations`);
}
export function getCaptchaConfig(): Promise<AxiosResponse<captchaConfig, unknown>> {
return client.get<captchaConfig>("/user/captcha/config");
export function getCaptchaConfig(): Promise<AxiosResponse<CaptchaConfig, unknown>> {
return client.get<CaptchaConfig>("/user/captcha");
}

View File

@@ -61,7 +61,7 @@ export interface UserOrganizationsResponse extends BaseResponse {
organizations: Org[];
}
export interface captchaConfig extends BaseResponse {
export interface CaptchaConfig extends BaseResponse {
provider: "disable" | "turnstile" | "recaptcha" | "hcaptcha" | "dev-captcha";
siteKey: string;
url?: string;