mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-10-15 05:19:17 +00:00
refactor(backend): 调整模块结构、调度器逻辑与健康检查路由
This commit is contained in:
@@ -24,7 +24,7 @@ export const ChatAPI = {
|
||||
},
|
||||
/** 删除会话 */
|
||||
removeSession(ids: number[]): Promise<void> {
|
||||
return http.Delete(`${AI_BASE}/delete`, { ids: JSON.stringify(ids) })
|
||||
return http.Delete(`${AI_BASE}/delete`, ids)
|
||||
},
|
||||
/** 发送消息 (非流式) */
|
||||
sendMessage(sessionId: number, content: string): Promise<ChatMessage> {
|
||||
|
||||
@@ -21,7 +21,7 @@ export const NoticeAPI = {
|
||||
return http.Put(`${SYSTEM_BASE}/notice/update/${id}`, data)
|
||||
},
|
||||
remove(ids: number[]): Promise<void> {
|
||||
return http.Delete(`${SYSTEM_BASE}/notice/delete`, { ids: JSON.stringify(ids) })
|
||||
return http.Delete(`${SYSTEM_BASE}/notice/delete`, ids)
|
||||
},
|
||||
batchStatus(data: BatchSetStatus): Promise<void> {
|
||||
return http.Patch(`${SYSTEM_BASE}/notice/status/batch`, data)
|
||||
|
||||
@@ -20,7 +20,7 @@ export const TicketAPI = {
|
||||
return http.Put(`${SYSTEM_BASE}/ticket/update/${id}`, data)
|
||||
},
|
||||
remove(ids: number[]): Promise<void> {
|
||||
return http.Delete(`${SYSTEM_BASE}/ticket/delete`, { ids: JSON.stringify(ids) })
|
||||
return http.Delete(`${SYSTEM_BASE}/ticket/delete`, ids)
|
||||
},
|
||||
batch(data: { ids: number[], status: number, assigned_id?: number }): Promise<void> {
|
||||
return http.Put(`${SYSTEM_BASE}/ticket/batch`, data)
|
||||
|
||||
@@ -25,7 +25,7 @@ const UserAPI = {
|
||||
* @returns uni.uploadFile 成功回调(statusCode + data 响应体字符串,需调用方解析)
|
||||
*/
|
||||
uploadCurrentUserAvatar(body: { filePath: string, name?: string }): Promise<{ statusCode: number, data: string }> {
|
||||
return http.Post(`${USER_BASE_URL}/current/avatar/upload`, body, { requestType: 'upload' })
|
||||
return http.Post('/file/upload?upload_type=avatar', body, { requestType: 'upload' })
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -45,7 +45,7 @@ const UserAPI = {
|
||||
* @returns 修改后的用户信息
|
||||
*/
|
||||
changeCurrentUserPassword(body: PasswordChangeForm): Promise<void> {
|
||||
return http.Put(`${USER_BASE_URL}/current/password/change`, body)
|
||||
return http.Put(`${USER_BASE_URL}/password/change`, body)
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -154,7 +154,7 @@ const UserAPI = {
|
||||
* @param body 用户表单数据
|
||||
*/
|
||||
updateUser(body: UserForm): Promise<void> {
|
||||
return http.Put(`${USER_BASE_URL}/update`, body)
|
||||
return http.Put(`${USER_BASE_URL}/update/${body.id}`, body)
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user