1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-24 13:52:21 +01:00
2021-07-01 12:04:48 +02:00

16 lines
512 B
TypeScript

import apiClient from './clients/api-client';
import { AxiosResponse } from 'axios';
import { Plan, PlansDuration } from '../models/plan';
export default class PlanAPI {
static async index (): Promise<Array<Plan>> {
const res: AxiosResponse<Array<Plan>> = await apiClient.get('/api/plans');
return res?.data;
}
static async durations (): Promise<Array<PlansDuration>> {
const res: AxiosResponse<Array<PlansDuration>> = await apiClient.get('/api/plans/durations');
return res?.data;
}
}