mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-08-08 08:28:02 +08:00
Refactor: Consolidation WEB API & HTTP API for document delete api (#14254)
### What problem does this PR solve? Before consolidation Web API: POST /v1/document/rm Http API - DELETE /api/v1/datasets/<dataset_id>/documents After consolidation, Restful API -- DELETE /api/v1/datasets/<dataset_id>/documents ### Type of change - [x] Refactoring
This commit is contained in:
@@ -18,8 +18,6 @@ const {
|
||||
kbList,
|
||||
getDocumentList,
|
||||
documentChangeStatus,
|
||||
documentRm,
|
||||
documentDelete,
|
||||
documentCreate,
|
||||
documentChangeParser,
|
||||
documentThumbnails,
|
||||
@@ -72,10 +70,6 @@ const methods = {
|
||||
url: documentChangeStatus,
|
||||
method: 'post',
|
||||
},
|
||||
documentRm: {
|
||||
url: documentRm,
|
||||
method: 'post',
|
||||
},
|
||||
documentCreate: {
|
||||
url: documentCreate,
|
||||
method: 'post',
|
||||
@@ -137,10 +131,6 @@ const methods = {
|
||||
url: knowledgeGraph,
|
||||
method: 'get',
|
||||
},
|
||||
documentDelete: {
|
||||
url: documentDelete,
|
||||
method: 'delete',
|
||||
},
|
||||
listTagByKnowledgeIds: {
|
||||
url: listTagByKnowledgeIds,
|
||||
method: 'get',
|
||||
@@ -276,6 +266,9 @@ export const renameDocument = (
|
||||
data: { name?: string },
|
||||
) => request.patch(api.documentRename(datasetId, documentId), { data });
|
||||
|
||||
export const deleteDocument = (datasetId: string, documentIds: string[]) =>
|
||||
request.delete(api.documentDelete(datasetId), { data: { ids: documentIds } });
|
||||
|
||||
export const getMetaDataService = ({
|
||||
kb_id,
|
||||
doc_ids,
|
||||
|
||||
Reference in New Issue
Block a user