Add re-analyse button and POST /documents/{id}/reprocess endpoint
Resets status to pending, clears error_message, and re-enqueues the background AI extraction task. Button is disabled while the document is already pending or processing; returns 409 in that case from the API. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -170,6 +170,9 @@ export const updateDocumentTags = (id: string, tags: string[]) =>
|
||||
export const updateDocumentTitle = (id: string, title: string) =>
|
||||
api.patch<DocumentOut>(`/documents/${id}/title`, { title }).then((r) => r.data);
|
||||
|
||||
export const reprocessDocument = (id: string) =>
|
||||
api.post<DocumentOut>(`/documents/${id}/reprocess`).then((r) => r.data);
|
||||
|
||||
export const assignCategory = (docId: string, catId: string) =>
|
||||
api.post(`/documents/${docId}/categories/${catId}`);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user