Browse Source

Add document approve method

pull/1251/head
Hironsan 4 years ago
parent
commit
e3f6c3c5c8
2 changed files with 7 additions and 0 deletions
  1. 5
      frontend/repositories/document/api.ts
  2. 2
      frontend/repositories/document/interface.ts

5
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<void> {
const url = `/projects/${projectId}/docs/${docId}/approve-labels`
await this.request.post(url, { approved })
}
}

2
frontend/repositories/document/interface.ts

@ -16,4 +16,6 @@ export interface DocumentItemRepository {
uploadFile(projectId: string, payload: FormData): Promise<void>
exportFile(projectId: string, format: string, onlyApproved: boolean): Promise<any>
approve(projectId: string, docId: number, approved: boolean): Promise<void>
}
Loading…
Cancel
Save