import { api } from "@/config/axios"; import { GetProfileResponse, SingleUploadResponse, UpdateProfileType, } from "../types/Types"; export const getProfile = async (): Promise => { const { data } = await api.get("/public/user/me"); return data; }; export const updateProfile = async (params: UpdateProfileType) => { const { data } = await api.patch("/public/user/update", params); return data; }; export const singleUpload = async ( file: File ): Promise => { const formData = new FormData(); formData.append("file", file); const { data } = await api.post( `/public/single-file`, formData, { headers: { "Content-Type": undefined, }, } ); return data; };