In react.js I'm making a api call using post method but I'm getting error in the console.
Here is my backend code
const editNote = async (id, title, description, tag) => { //api callconst host = 'mongodb+srv://vivek:xyz@cluster0.mdigo2h.mongodb.net/?retryWrites=true&w=majority&appName=Cluster0' const response = await fetch(`${host}/api/notes/updatenote/${id}`, { method: "POST", headers: {"Content-Type": "application/json","auth-token":"xyz", }, body: JSON.stringify({ title, description, tag }), }); const json = response.json();}
In frontend there are input fields and a button when a click on button then I get error.
If know the solution kindly tell.Thanks in advance.