const API_URL = "http://127.0.0.1:8000/users";

export async function getUser(userId: number) {
	const res = await fetch(`${API_URL}/${userId}`);
	return res.json();
}

export async function createUser(userData: any) {
	const res = await fetch(API_URL, {
		method: "POST",
		headers: { "Content-Type": "application/json" },
		body: JSON.stringify(userData),
	});
	return res.json();
}
