From 180297e1244bdb96f51a178d60f3045e6d8e36d7 Mon Sep 17 00:00:00 2001 From: Andrea Diotallevi Date: Sun, 22 Sep 2024 20:55:14 +0100 Subject: [PATCH] feat: temporarily disable creative hub api call --- .../src/actions/stripe_synchroniseProducts.ts | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/serverless/src/actions/stripe_synchroniseProducts.ts b/serverless/src/actions/stripe_synchroniseProducts.ts index 584ce8e..d15c283 100644 --- a/serverless/src/actions/stripe_synchroniseProducts.ts +++ b/serverless/src/actions/stripe_synchroniseProducts.ts @@ -71,35 +71,35 @@ export const stripeSynchroniseProducts = async () => { } const getProducts = async (): Promise => { - const theprintspaceProducts = await getAllProducts() + // const theprintspaceProducts = await getAllProducts() - const getProductByFilename = (fileName: string) => { - const product = theprintspaceProducts.Data.find( - product => product.FileName === fileName - ) + // const getProductByFilename = (fileName: string) => { + // const product = theprintspaceProducts.Data.find( + // product => product.FileName === fileName + // ) - return product - } + // return product + // } return products.map(product => { - const theprintspaceProduct = getProductByFilename( - product.metadata.sku + ".png" - ) + // const theprintspaceProduct = getProductByFilename( + // product.metadata.sku + ".png" + // ) - if (product.active && !theprintspaceProduct) { - throw new Error( - `No theprintspace product found for sku ${product.metadata.sku}` - ) - } + // if (product.active && !theprintspaceProduct) { + // throw new Error( + // `No theprintspace product found for sku ${product.metadata.sku}` + // ) + // } return { ...product, metadata: { ...product.metadata, - theprintspaceProductId: String(theprintspaceProduct?.Id), - theprintspacePrintOptionId: String( - theprintspaceProduct?.PrintOptions[0].Id - ), + // theprintspaceProductId: String(theprintspaceProduct?.Id), + // theprintspacePrintOptionId: String( + // theprintspaceProduct?.PrintOptions[0].Id + // ), }, } })