Selaa lähdekoodia

fix: Chunks cannot be deleted #1912 (#1913)

### What problem does this PR solve?

fix: Chunks cannot be deleted #1912

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
tags/v0.10.0
balibabu 1 vuosi sitten
vanhempi
commit
936d8ab7dd
No account linked to committer's email address

+ 1
- 1
web/src/hooks/chunk-hooks.ts Näytä tiedosto

@@ -124,7 +124,7 @@ export const useDeleteChunk = () => {
mutateAsync,
} = useMutation({
mutationKey: ['deleteChunk'],
mutationFn: async (params: { chunkIds: string[]; documentId: string }) => {
mutationFn: async (params: { chunkIds: string[]; doc_id: string }) => {
const { data } = await kbService.rm_chunk(params);
if (data.retcode === 0) {
setPaginationParams(1);

+ 1
- 1
web/src/pages/add-knowledge/components/knowledge-chunk/hooks.ts Näytä tiedosto

@@ -67,7 +67,7 @@ export const useDeleteChunkByIds = (): {

const removeChunk = useCallback(
(chunkIds: string[], documentId: string) => () => {
return deleteChunk({ chunkIds, documentId });
return deleteChunk({ chunkIds, doc_id: documentId });
},
[deleteChunk],
);

Loading…
Peruuta
Tallenna