fix names not urls

This commit is contained in:
Wingy 2019-12-03 15:51:28 -05:00
parent 0732a264a1
commit 763aa7c027

View file

@ -84,6 +84,7 @@ module.exports = (db) => {
item.pledgedBy = (req.user._id === req.params.user ? undefined : req.user._id); item.pledgedBy = (req.user._id === req.params.user ? undefined : req.user._id);
item.note = req.body.note; item.note = req.body.note;
if (url) item.url = url; if (url) item.url = url;
if (!url) item.name = potentialUrl
item.id = uuid(); item.id = uuid();
const doc = await db.get(req.params.user); const doc = await db.get(req.params.user);
doc.wishlist.push(item); doc.wishlist.push(item);