Hi everyone, I'm currently working on an email application and need help with implementing an archive button for each email. It seems that the function to change the archived status to true is being called, but for some reason, it's not making the change.
Interestingly, when I replace "archived: true" with "read: true", the 'read' status does get changed to true. However, it doesn't work for the archived attribute.
I've double-checked and confirmed that 'archived' is a valid attribute in the JSON API.
Any ideas why this might be happening? Here's the relevant code snippet:
function archive_email(id) {
fetch('/emails/' + id, {
method: 'PUT',
body: JSON.stringify({
archived: true
})
})
load_mailbox("inbox");
}