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.

24 lines
679 B

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