You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
621 B

2 years ago
2 years ago
  1. import ApiService from '@/services/api.service'
  2. export class APIParseRepository {
  3. constructor(private readonly request = ApiService) {}
  4. async analyze(
  5. projectId: string,
  6. format: string,
  7. task: string,
  8. uploadIds: number[],
  9. option: object
  10. ): Promise<string> {
  11. const url = `/projects/${projectId}/upload`
  12. const data = {
  13. format,
  14. task,
  15. uploadIds,
  16. ...option
  17. }
  18. const response = await this.request.post(url, data)
  19. return response.data.task_id
  20. }
  21. revert(serverId: string): void {
  22. const url = `/fp/revert/`
  23. this.request.delete(url, serverId)
  24. }
  25. }