const callAPI = async () => {
try {
const res = await fetch(`http://localhost:3000/api/cookbook/create`, {
method: "post",
body: JSON.stringify(state),
});
console.log(res);
} catch (err) {
console.log(err);
}
};
const callAPI = async () => {
try {
const res = await fetch(`http://localhost:3000/api/cookbook/create`, {
method: "post",
body: JSON.stringify(state),
});
console.log(res);
} catch (err) {
console.log(err);
}
};