import { Prisma, User } from "@repo/db";
import axios from "axios";

export const editUserAPI = async ({ id, user }: { id: string; user: Prisma.UserUpdateInput }) => {
	const response = await axios.post<User>(`/api/user?id=${id}`, user);
	return response.data;
};

export const getUserAPI = async (id: string) => {
	const response = await axios.get<User>(`/api/user?id=${id}`);
	return response.data;
};
