"use server";
import postData from "@/api/post-data";
import { revalidatePath } from "next/cache";

export async function createProduct(data) {
  const res = await postData({
    endPoint: "/user/products",
    body: data,
  });
  if (res.error) {
    return res;
  }
  revalidatePath("/vendor");
  return res;
}
