import { httpDeleteInterceptor, httpGet, httpPost, httpPut, } from "./http-config/axios-base-service"; import Cookies from "js-cookie"; const token = Cookies.get("access_token"); export async function createFeedback(data: any) { const headers = { "content-type": "application/json", }; const pathUrl = `/feedbacks`; return await httpPost(pathUrl, headers, data); } export async function getFeedbacks(data: any) { const headers = { "content-type": "application/json", }; const pathUrl = `/feedbacks?page=${data?.page || 1}limit=${ data?.limit || "" }&message=${data?.search || ""}`; return await httpGet(pathUrl, headers); } export async function getFeedbacksById(id: number) { const headers = { "content-type": "application/json", }; const pathUrl = `/feedbacks/${id}`; return await httpGet(pathUrl, headers); } export async function deleteFeedback(id: number) { const headers = { "content-type": "application/json", }; return await httpDeleteInterceptor(`/feedbacks/${id}`, headers); }