Refactoring clear document UI

This commit is contained in:
yangdx
2025-04-01 13:31:14 +08:00
parent cd94e84267
commit 4c9c600472
6 changed files with 155 additions and 10 deletions

View File

@@ -382,6 +382,14 @@ export const clearDocuments = async (): Promise<DocActionResponse> => {
return response.data
}
export const clearCache = async (modes?: string[]): Promise<{
status: 'success' | 'fail'
message: string
}> => {
const response = await axiosInstance.post('/documents/clear_cache', { modes })
return response.data
}
export const getAuthStatus = async (): Promise<AuthStatusResponse> => {
try {
// Add a timeout to the request to prevent hanging