Skip to content

Commit

Permalink
fix: Chunks cannot be deleted #1912 (#1913)
Browse files Browse the repository at this point in the history
### 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)
  • Loading branch information
cike8899 authored Aug 12, 2024
1 parent 68d1315 commit 936d8ab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion web/src/hooks/chunk-hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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],
);
Expand Down

0 comments on commit 936d8ab

Please sign in to comment.