mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-03 01:40:21 +08:00
fix(public): 修复用户可见性、额度、验证与 Codex 探测
This commit is contained in:
@@ -33,6 +33,7 @@ export interface UserStats {
|
||||
|
||||
export interface SendVerificationCodeRequest {
|
||||
email: string
|
||||
turnstile_token?: string
|
||||
}
|
||||
|
||||
export interface SendVerificationCodeResponse {
|
||||
@@ -67,6 +68,7 @@ export interface RegisterRequest {
|
||||
email?: string
|
||||
username: string
|
||||
password: string
|
||||
turnstile_token?: string
|
||||
}
|
||||
|
||||
export interface RegisterResponse {
|
||||
@@ -81,6 +83,8 @@ export interface RegistrationSettingsResponse {
|
||||
require_email_verification: boolean
|
||||
email_configured: boolean
|
||||
password_policy_level: string
|
||||
turnstile_enabled?: boolean
|
||||
turnstile_site_key?: string | null
|
||||
}
|
||||
|
||||
export interface AuthSettingsResponse {
|
||||
@@ -153,10 +157,17 @@ export const authApi = {
|
||||
return response.data
|
||||
},
|
||||
|
||||
async sendVerificationCode(email: string): Promise<SendVerificationCodeResponse> {
|
||||
async sendVerificationCode(
|
||||
email: string,
|
||||
turnstileToken?: string
|
||||
): Promise<SendVerificationCodeResponse> {
|
||||
const payload: SendVerificationCodeRequest = { email }
|
||||
if (turnstileToken) {
|
||||
payload.turnstile_token = turnstileToken
|
||||
}
|
||||
const response = await apiClient.post<SendVerificationCodeResponse>(
|
||||
'/api/auth/send-verification-code',
|
||||
{ email }
|
||||
payload
|
||||
)
|
||||
return response.data
|
||||
},
|
||||
|
||||
@@ -30,7 +30,7 @@ export interface UserPreferences {
|
||||
avatar_url?: string
|
||||
bio?: string
|
||||
default_provider_id?: string // UUID
|
||||
default_provider?: Record<string, unknown>
|
||||
default_provider?: Record<string, unknown> | string | null // 仅管理员可见
|
||||
theme: string
|
||||
language: string
|
||||
timezone?: string
|
||||
@@ -52,7 +52,7 @@ export interface ProviderConfig {
|
||||
// 使用记录接口
|
||||
export interface UsageRecordDetail {
|
||||
id: string
|
||||
provider: string
|
||||
provider?: string // 仅管理员可见
|
||||
model: string
|
||||
input_tokens: number
|
||||
effective_input_tokens?: number
|
||||
|
||||
Reference in New Issue
Block a user