mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-17 18:35:19 +02:00
fix: recurse
This commit is contained in:
parent
e6775625ff
commit
ede9dd010b
1 changed files with 1 additions and 2 deletions
|
|
@ -81,12 +81,11 @@ export const updateDocumentMutationAtom = atomWithMutation((get) => {
|
||||||
|
|
||||||
export const deleteDocumentMutationAtom = atomWithMutation((get) => {
|
export const deleteDocumentMutationAtom = atomWithMutation((get) => {
|
||||||
const searchSpaceId = get(activeSearchSpaceIdAtom);
|
const searchSpaceId = get(activeSearchSpaceIdAtom);
|
||||||
const authToken = localStorage.getItem("surfsense_bearer_token");
|
|
||||||
const documentsQueryParams = get(globalDocumentsQueryParamsAtom);
|
const documentsQueryParams = get(globalDocumentsQueryParamsAtom);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
mutationKey: cacheKeys.documents.globalQueryParams(documentsQueryParams),
|
mutationKey: cacheKeys.documents.globalQueryParams(documentsQueryParams),
|
||||||
enabled: !!searchSpaceId && !!authToken,
|
enabled: !!searchSpaceId,
|
||||||
mutationFn: async (request: DeleteDocumentRequest) => {
|
mutationFn: async (request: DeleteDocumentRequest) => {
|
||||||
return documentsApiService.deleteDocument(request);
|
return documentsApiService.deleteDocument(request);
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue