@@ -859,44 +859,45 @@ app.get("/fundraiser/winter-23/:slug", async (req, res) => {
859859
860860app . get ( "/donate" , async ( req , res ) => {
861861
862- const responseTest = await getDatabaseEntries ( "16ea90c83765437c86f87bd13a205ca6" , [ { property :"Date" , direction :"descending" } ] )
863- const testimonialData = responseTest . map ( ( testimonial ) => {
864- console . log ( testimonial )
865- return parseTestimonials ( testimonial )
866- } )
867- console . log ( testimonialData )
862+ // const responseTest = await getDatabaseEntries("16ea90c83765437c86f87bd13a205ca6", [{property:"Date", direction:"descending"}])
863+ // const testimonialData = responseTest.map((testimonial) => {
864+ // console.log(testimonial)
865+ // return parseTestimonials(testimonial)
866+ // })
867+ // console.log(testimonialData)
868868
869- const response = await getDatabaseEntries ( NOTION_STORE_DATABASE_ID , [
870- { property : "Name" , direction : "descending" } ,
871- ] ) ;
872- console . log ( response ) ;
869+ // const response = await getDatabaseEntries(NOTION_STORE_DATABASE_ID, [
870+ // { property: "Name", direction: "descending" },
871+ // ]);
872+ // console.log(response);
873873
874- const productsData = response . map ( ( product ) => {
875- return parseProductData ( product ) ;
876- } ) ;
874+ // const productsData = response.map((product) => {
875+ // return parseProductData(product);
876+ // });
877877
878- const shopifyData = await getShopifyProducts ( ) ;
878+ // const shopifyData = await getShopifyProducts();
879879
880- for ( const product of productsData ) {
881- const shopifyId = product [ "Shopify ID" ] ;
880+ // for (const product of productsData) {
881+ // const shopifyId = product["Shopify ID"];
882882
883- if ( ! shopifyId ) {
884- continue ;
885- }
883+ // if (!shopifyId) {
884+ // continue;
885+ // }
886886
887- const node = shopifyData [ `gid://shopify/Product/${ shopifyId } ` ] ;
887+ // const node = shopifyData[`gid://shopify/Product/${shopifyId}`];
888888
889- if ( node ) {
890- product . availableForSale = node . availableForSale ;
891- product . totalInventory = node . totalInventory ;
892- product . availableInventory = node . variants . edges . reduce ( ( accum , val ) => {
893- return accum + val . node . quantityAvailable ;
894- } , 0 ) ;
895- }
896- }
889+ // if (node) {
890+ // product.availableForSale = node.availableForSale;
891+ // product.totalInventory = node.totalInventory;
892+ // product.availableInventory = node.variants.edges.reduce((accum, val) => {
893+ // return accum + val.node.quantityAvailable;
894+ // }, 0);
895+ // }
896+ // }
897897
898- console . log ( productsData ) ;
899- res . render ( "donate/storefront" , { products : productsData , testimonials : testimonialData } ) ;
898+ // console.log(productsData);
899+ // res.render("donate/storefront", { products: productsData, testimonials: testimonialData });
900+ res . render ( "donate/storefront" ) ;
900901} ) ;
901902
902903
0 commit comments