From fdc3c814d0a3718beebf09f9e822dc2f88958c2f Mon Sep 17 00:00:00 2001 From: Wingy Date: Mon, 2 Nov 2020 23:28:05 -0500 Subject: [PATCH] automatic image/price --- routes/wishlist/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/routes/wishlist/index.js b/routes/wishlist/index.js index fbaf59e..0b72fa4 100644 --- a/routes/wishlist/index.js +++ b/routes/wishlist/index.js @@ -84,6 +84,8 @@ module.exports = (db) => { req.flash('error', err.toString()); } item.name = (productData ? productData.name : ''); + item.price = productData?.price + item.image = productData?.image item.addedBy = req.user._id; item.pledgedBy = (req.user._id === req.params.user ? undefined : req.user._id); item.note = req.body.note;