import axios from "axios"; import { MainimgType } from "../types"; import baseUrl from "./baseUrl"; export const mainimg = async (formdata: FormData) => { const { data } = await axios.post(`${baseUrl}/mainimg`, formdata); return data; }; export const delmainimg = async (_id: string) => { const { data } = await axios.delete(`${baseUrl}/mainimg/${_id}`); return data; }; export const getmainimg = async () => { const { data } = await axios.get(`${baseUrl}/mainimg`); return data; }; export const updateimg = async (formdata: FormData, _id: string) => { const { data } = await axios.put(`${baseUrl}/mainimg/${_id}`, formdata); return data; };