|
|
@ -1,6 +1,6 @@ |
|
|
|
import ApiService from '@/services/api.service' |
|
|
|
import { MetricsRepository } from '@/domain/models/metrics/metricsRepository' |
|
|
|
import { Distribution, Progress } from '~/domain/models/metrics/metrics' |
|
|
|
import { Distribution, Progress, MyProgress } from '~/domain/models/metrics/metrics' |
|
|
|
|
|
|
|
export class APIMetricsRepository implements MetricsRepository { |
|
|
|
constructor( |
|
|
@ -24,4 +24,10 @@ export class APIMetricsRepository implements MetricsRepository { |
|
|
|
const response = await this.request.get(url) |
|
|
|
return response.data |
|
|
|
} |
|
|
|
|
|
|
|
async fetchMyProgress(projectId: string): Promise<MyProgress> { |
|
|
|
const url = `/projects/${projectId}/metrics/progress` |
|
|
|
const response = await this.request.get(url) |
|
|
|
return response.data |
|
|
|
} |
|
|
|
} |