Api cleanup

This commit is contained in:
Dominic Ferrando
2026-07-10 14:45:16 -04:00
parent 105d2b6241
commit a09d11e8e4
3 changed files with 57 additions and 56 deletions
@@ -14,7 +14,7 @@
return this.status === "active" || this.status === "queued";
},
poll: async function () {
const res = await api.products.sync.get();
const res = await api.commerce.products.sync.get();
if (res.error) {
synchronizer.status = "none";
synchronizer.syncingPProductIds = [];
@@ -32,11 +32,11 @@
},
syncAll: async () => {
synchronizer.startPolling();
await api.products.sync.post();
await api.commerce.products.sync.post();
},
sync: async (pProductId: number) => {
synchronizer.startPolling();
await api.products.sync({ pProductId }).post();
await api.commerce.products.sync({ pProductId }).post();
},
});
@@ -86,7 +86,7 @@
<td
><button
onclick={async () => {
const res = await api
const res = await api.commerce
.products({
pProductId:
pProduct.id,