mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-23 08:56:42 +08:00
Refactor: Consolidation WEB API & HTTP API for document get_filter (#14248)
### What problem does this PR solve? Before consolidation Web API: POST /v1/document/filter Http API - GET /api/v1/datasets/<dataset_id>/documents After consolidation, Restful API -- GET /api/v1/datasets/<dataset_id>/documents?type=filter ### Type of change - [x] Refactoring
This commit is contained in:
@@ -16,6 +16,7 @@ import {
|
||||
import i18n from '@/locales/config';
|
||||
import { EMPTY_METADATA_FIELD } from '@/pages/dataset/dataset/use-select-filters';
|
||||
import kbService, {
|
||||
documentFilter,
|
||||
listDocument,
|
||||
renameDocument,
|
||||
uploadDocument,
|
||||
@@ -214,10 +215,7 @@ export const useGetDocumentFilter = (): {
|
||||
knowledgeId,
|
||||
],
|
||||
queryFn: async () => {
|
||||
const { data } = await kbService.documentFilter({
|
||||
kb_id: knowledgeId || id,
|
||||
keywords: debouncedSearchString,
|
||||
});
|
||||
const { data } = await documentFilter(knowledgeId || id);
|
||||
if (data.code === 0) {
|
||||
return data.data;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user