18 lines
485 B
TypeScript
18 lines
485 B
TypeScript
import axios from "../../../config/axios";
|
|
import { CreatePlanType } from "../types/SupportTypes";
|
|
|
|
export const createPlan = async (plan: CreatePlanType) => {
|
|
const { data } = await axios.post("/support-plans", plan);
|
|
return data;
|
|
};
|
|
|
|
export const getPlans = async () => {
|
|
const { data } = await axios.get("/support-plans/list");
|
|
return data;
|
|
};
|
|
|
|
export const getPlanById = async (id: string) => {
|
|
const { data } = await axios.get(`/support-plans/${id}`);
|
|
return data;
|
|
};
|