13 lines
357 B
TypeScript
13 lines
357 B
TypeScript
import axios from "@/config/axios";
|
|
import type { CreateSectionType } from "../types/Types";
|
|
|
|
export const getSections = async () => {
|
|
const { data } = await axios.get(`/admin/section`);
|
|
return data;
|
|
};
|
|
|
|
export const createSection = async (params: CreateSectionType) => {
|
|
const { data } = await axios.post(`/admin/section`, params);
|
|
return data;
|
|
};
|