apiclient

This commit is contained in:
2025-11-22 04:22:18 +01:00
parent 41005390e8
commit 5498cf4342
13 changed files with 224 additions and 46 deletions
@@ -48,6 +48,7 @@ import useTags from './useTags';
import useCorrespondents from './useCorrespondents';
import useTenantManager from './useTenantManager';
import useDocuments from './useDocuments';
import { fetchDocument } from '../../lib/apiClient';
import useFolderTree from './useFolderTree';
import useFolderTreeActions from './useFolderTreeActions';
import useDocumentTagging from './useDocumentTagging';
@@ -238,7 +239,7 @@ const useDocumentsWorkspace = ({
if (!documentId) {
return null;
}
const { data } = await api.get(`/documents/${documentId}`);
const data = await fetchDocument(documentId);
return extractDocumentFromResponse(data);
},
[extractDocumentFromResponse],
@@ -449,7 +450,6 @@ const useDocumentsWorkspace = ({
routeDocumentId: previewDocumentId,
documentsManager,
selectedFolder,
api,
notifyApiError,
navigate,
locationPathname: location.pathname,