Enqueue product sync delete event

This commit is contained in:
Dominic Ferrando
2026-07-12 05:44:09 -04:00
parent 4c2acfaede
commit f4638ef028
4 changed files with 34 additions and 16 deletions
+6 -1
View File
@@ -253,7 +253,12 @@ export const app = new Elysia()
log.info({ externalId: payload.data.sync_product.external_id, wProductId }, "printful webhook: product deleted");
if (!wProductId) throw new NotFoundError("Missing webflow product ID");
await s.Commerce.Webflow.Products.remove(wProductId);
await s.Commerce.ProductSync.Queue.enqueue({
type: "product_sync_delete",
source: "printful",
payload: { wProductId }
});
break;
}
case Printful.Webhook.Event.PackageShipped: {