diff --git a/frontend/repositories/document/api.ts b/frontend/repositories/document/api.ts index 81d3c8b8..3b9feec1 100644 --- a/frontend/repositories/document/api.ts +++ b/frontend/repositories/document/api.ts @@ -69,4 +69,9 @@ export class FromApiDocumentItemListRepository implements DocumentItemRepository const url = `/projects/${projectId}/docs/download` return await this.request.get(url, config) } + + async approve(projectId: string, docId: number, approved: boolean): Promise { + const url = `/projects/${projectId}/docs/${docId}/approve-labels` + await this.request.post(url, { approved }) + } } diff --git a/frontend/repositories/document/interface.ts b/frontend/repositories/document/interface.ts index 690b852d..d7592590 100644 --- a/frontend/repositories/document/interface.ts +++ b/frontend/repositories/document/interface.ts @@ -16,4 +16,6 @@ export interface DocumentItemRepository { uploadFile(projectId: string, payload: FormData): Promise exportFile(projectId: string, format: string, onlyApproved: boolean): Promise + + approve(projectId: string, docId: number, approved: boolean): Promise }