From 763aa7c02759324d2c46b0b995151ea8f6040d2c Mon Sep 17 00:00:00 2001 From: Wingy Date: Tue, 3 Dec 2019 15:51:28 -0500 Subject: [PATCH] fix names not urls --- routes/wishlist/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/routes/wishlist/index.js b/routes/wishlist/index.js index ff0bffc..88f5805 100644 --- a/routes/wishlist/index.js +++ b/routes/wishlist/index.js @@ -84,6 +84,7 @@ module.exports = (db) => { item.pledgedBy = (req.user._id === req.params.user ? undefined : req.user._id); item.note = req.body.note; if (url) item.url = url; + if (!url) item.name = potentialUrl item.id = uuid(); const doc = await db.get(req.params.user); doc.wishlist.push(item);