I am not familiar with Ajax and this may seem like a silly question but
according to the documents
Create / Update collection entries
fetch('/api/collections/save/posts?token=xxtokenxx', {
method: 'post',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
data: {...}
})
})
.then(res=>res.json())
.then(entry => console.log(entry));
I can insert new entries but I cannot update any of my entries.
would you please give me an example to how I can update an existing entry ?