'use server';

import { revalidatePath } from "next/cache";
import postData from "../post-data";
import { getToken } from "@/actions/cookies";

export default async function updateUserProfile(data) {
   const res = await postData({
      endPoint: "/user/update/profile",
      token: await getToken(),
      body: data,
   });
   revalidatePath('/user');
   return res;
}