mirror of
https://github.com/LiteyukiStudio/spage.git
synced 2026-01-26 05:31:58 +00:00
✨ 更新用户 API 模型,修正 CaptchaConfig 接口名称并调整相关方法
This commit is contained in:
@@ -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");
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user