Hi, I'm trying to update a singleton using the SDK. Sadly, the only thing that's actually updating is the date_updated field, no matter what I do.
I tried using:
updateOne(1, updates)-/foo/1does not existupdateByQuery({ id: { _eq: 1 } }, updates)- only updates thedate_updatedfieldupdateMany(1, updates),updateMany(null, updates)- only updates thedate_updatedfield
I'm kind of lost. Right now I'm pondering if maybe I should just resign from using singletons... Anything I'm not seeing? I already checked multiple times if I'm passing the correct updates, so no luck there.
Important to note: the revisions are actually showing up in the panel, but the data I'm passing does not change.
Full code:
const updates = {
full_margin: 100,
full_minimum: 100,
product_margin: 100,
product_minimum: 100
};
const newData = (await api.items('global_margins').updateMany(null, updates)).data;```
And I'm also including a screenshoot of the singleton panel in admin.