Hi,
I am trying to create an entry ‘location’, via an authenticated user. It gets added to the DB, but it isn’t associated with the user. I am using JWT. See all screenshots. Going mad here, no idea whats going wrong. I have checked the token, it is correct.
Any help would be greatly appriciated, not sure wat my next move is here otherwise.
const res = await fetch (`${API_URL}/api/locations`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${token}`
},
body: valuesObj,
}).then((res) => res.json())