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.

13 lines
446 B

2 years ago
  1. import { plainToInstance } from 'class-transformer'
  2. import { Status } from '@/domain/models/celery/status'
  3. import ApiService from '@/services/api.service'
  4. export class APITaskStatusRepository {
  5. constructor(private readonly request = ApiService) {}
  6. async get(taskId: string): Promise<Status> {
  7. const url = `/tasks/status/${taskId}`
  8. const response = await this.request.get(url)
  9. return plainToInstance(Status, response.data)
  10. }
  11. }