import { title } from "process"; import { httpGetInterceptor } from "../http-config/http-interceptor-service"; import { getAPIInterceptor, postAPIInterceptor } from "@/config/api"; export async function paginationBlog( size: number, page: number, title: string = "" ) { return await httpGetInterceptor( `blog/pagination?enablePage=1&page=${page}&size=${size}&title=${title}` ); } export async function postBlog(data: any) { const url = "blog"; return postAPIInterceptor(url, data); } export async function getBlog(id: any) { const url = `blog/${id}`; return getAPIInterceptor(url); } export async function uploadThumbnailBlog(id: any, data: any) { const url = `blog/${id}/thumbnail`; return postAPIInterceptor(url, data); }