Hi all, I'm trying to update this user's password but I'm getting 404 saying route is not found. What am I doing wrong?
fetch(https://cleanvid-cloud.directus.app/users/346b4b2f-bd3c-474a-a66b-a6a5f55ee26a, {
method: 'PUT',
headers: {
'Content-Type': 'application/json',
'Authorization': Bearer mytoken here
},
body: JSON.stringify({
password: "Changeme123!"
})
})
.then(response => {
console.log({ response })
if (response.ok) {
console.log('Password updated successfully!');
} else {
throw new Error('Failed to update password');
}
})
.catch(error => {
console.error(error);
});