Refactor localization files and remove Aliyun references
This commit is contained in:
@@ -209,21 +209,6 @@ export const authApi = {
|
||||
await apiClient.put(API_ENDPOINTS.AUTH.PREFERENCES, data)
|
||||
},
|
||||
|
||||
setAliyunKey: async (apiKey: string): Promise<void> => {
|
||||
await apiClient.post(API_ENDPOINTS.AUTH.SET_ALIYUN_KEY, { api_key: apiKey })
|
||||
},
|
||||
|
||||
deleteAliyunKey: async (): Promise<void> => {
|
||||
await apiClient.delete(API_ENDPOINTS.AUTH.SET_ALIYUN_KEY)
|
||||
},
|
||||
|
||||
verifyAliyunKey: async (): Promise<{ valid: boolean; message: string }> => {
|
||||
const response = await apiClient.get<{ valid: boolean; message: string }>(
|
||||
API_ENDPOINTS.AUTH.VERIFY_ALIYUN_KEY
|
||||
)
|
||||
return response.data
|
||||
},
|
||||
|
||||
getNsfwAccess: async (): Promise<{ has_access: boolean }> => {
|
||||
const response = await apiClient.get<{ has_access: boolean }>(API_ENDPOINTS.AUTH.NSFW_ACCESS)
|
||||
return response.data
|
||||
@@ -247,21 +232,6 @@ export interface UserUsageStats {
|
||||
}
|
||||
|
||||
export const adminApi = {
|
||||
setAliyunKey: async (apiKey: string): Promise<void> => {
|
||||
await apiClient.post(API_ENDPOINTS.ADMIN.SET_ALIYUN_KEY, { api_key: apiKey })
|
||||
},
|
||||
|
||||
deleteAliyunKey: async (): Promise<void> => {
|
||||
await apiClient.delete(API_ENDPOINTS.ADMIN.SET_ALIYUN_KEY)
|
||||
},
|
||||
|
||||
verifyAliyunKey: async (): Promise<{ valid: boolean; message: string }> => {
|
||||
const response = await apiClient.get<{ valid: boolean; message: string }>(
|
||||
API_ENDPOINTS.ADMIN.VERIFY_ALIYUN_KEY
|
||||
)
|
||||
return response.data
|
||||
},
|
||||
|
||||
getLLMConfig: async (): Promise<{ base_url?: string; model?: string; has_key: boolean }> => {
|
||||
const response = await apiClient.get<{ base_url?: string; model?: string; has_key: boolean }>(
|
||||
API_ENDPOINTS.ADMIN.LLM_CONFIG
|
||||
|
||||
@@ -50,7 +50,6 @@ export interface AudiobookCharacter {
|
||||
voice_design_id?: number
|
||||
voice_design_name?: string
|
||||
voice_design_speaker?: string
|
||||
use_indextts2?: boolean
|
||||
}
|
||||
|
||||
export interface AudiobookChapter {
|
||||
@@ -175,7 +174,7 @@ export const audiobookApi = {
|
||||
updateCharacter: async (
|
||||
projectId: number,
|
||||
charId: number,
|
||||
data: { name?: string; gender?: string; description?: string; instruct?: string; voice_design_id?: number; use_indextts2?: boolean }
|
||||
data: { name?: string; gender?: string; description?: string; instruct?: string; voice_design_id?: number }
|
||||
): Promise<AudiobookCharacter> => {
|
||||
const response = await apiClient.put<AudiobookCharacter>(
|
||||
`/audiobook/projects/${projectId}/characters/${charId}`,
|
||||
|
||||
@@ -4,8 +4,6 @@ export const API_ENDPOINTS = {
|
||||
ME: '/auth/me',
|
||||
CHANGE_PASSWORD: '/auth/change-password',
|
||||
PREFERENCES: '/auth/preferences',
|
||||
SET_ALIYUN_KEY: '/auth/aliyun-key',
|
||||
VERIFY_ALIYUN_KEY: '/auth/aliyun-key/verify',
|
||||
NSFW_ACCESS: '/auth/nsfw-access',
|
||||
},
|
||||
TTS: {
|
||||
@@ -30,8 +28,6 @@ export const API_ENDPOINTS = {
|
||||
DELETE: (id: number) => `/users/${id}`,
|
||||
},
|
||||
ADMIN: {
|
||||
SET_ALIYUN_KEY: '/users/system/aliyun-key',
|
||||
VERIFY_ALIYUN_KEY: '/users/system/aliyun-key/verify',
|
||||
LLM_CONFIG: '/users/system/llm-config',
|
||||
GROK_CONFIG: '/users/system/grok-config',
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user