mirror of
https://github.com/arc53/DocsGPT.git
synced 2025-11-29 16:43:16 +00:00
feat: add update chunk API endpoint and service method
This commit is contained in:
@@ -29,6 +29,7 @@ const endpoints = {
|
||||
ADD_CHUNK: '/api/add_chunk',
|
||||
DELETE_CHUNK: (docId: string, chunkId: string) =>
|
||||
`/api/delete_chunk?id=${docId}&chunk_id=${chunkId}`,
|
||||
UPDATE_CHUNK: '/api/update_chunk',
|
||||
},
|
||||
CONVERSATION: {
|
||||
ANSWER: '/api/answer',
|
||||
|
||||
@@ -57,6 +57,8 @@ const userService = {
|
||||
apiClient.post(endpoints.USER.ADD_CHUNK, data),
|
||||
deleteChunk: (docId: string, chunkId: string): Promise<any> =>
|
||||
apiClient.delete(endpoints.USER.DELETE_CHUNK(docId, chunkId)),
|
||||
updateChunk: (data: any): Promise<any> =>
|
||||
apiClient.put(endpoints.USER.UPDATE_CHUNK, data),
|
||||
};
|
||||
|
||||
export default userService;
|
||||
|
||||
Reference in New Issue
Block a user