26 lines
721 B
TypeScript
26 lines
721 B
TypeScript
import { title } from "process";
|
|
import { httpGetInterceptor } from "../http-config/http-interceptor-service";
|
|
import { type } from "os";
|
|
import { getAPI, getAPIInterceptor, postAPIInterceptor } from "@/config/api";
|
|
|
|
export async function paginationSchedule(
|
|
size: number,
|
|
page: number,
|
|
type: any,
|
|
title: string = ""
|
|
) {
|
|
return await httpGetInterceptor(
|
|
`schedule/pagination?enablePage=1&scheduleTypeId=${type}&page=${page}&size=${size}&title=${title}`
|
|
);
|
|
}
|
|
|
|
export async function postSchedule(data: any) {
|
|
const url = "schedule";
|
|
return postAPIInterceptor(url, data);
|
|
}
|
|
|
|
export async function detailSchedule(id: any) {
|
|
const url = `public/schedule?id=${id}`;
|
|
return getAPIInterceptor({ url });
|
|
}
|