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

16 lines
512 B
TypeScript
Raw Normal View History

import apiClient from './clients/api-client';
import { AxiosResponse } from 'axios';
2021-06-10 14:06:53 +02:00
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;
}
2021-06-10 14:06:53 +02:00
static async durations (): Promise<Array<PlansDuration>> {
2021-07-01 12:04:48 +02:00
const res: AxiosResponse<Array<PlansDuration>> = await apiClient.get('/api/plans/durations');
2021-06-10 14:06:53 +02:00
return res?.data;
}
}