From 285979d777383ea3c020b09702087c098bfecbe9 Mon Sep 17 00:00:00 2001 From: Sam Wing Date: Sat, 16 Nov 2019 22:50:34 -0500 Subject: [PATCH] allow notes to be overwritten --- routes/wishlist/index.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/routes/wishlist/index.js b/routes/wishlist/index.js index cf075af..164c7a3 100644 --- a/routes/wishlist/index.js +++ b/routes/wishlist/index.js @@ -177,13 +177,8 @@ module.exports = (db) => { req.flash('error', 'Invalid user'); return res.redirect(`/wishlist/${req.params.user}`); } - if (wishlistItem.note) { - req.flash('error', 'Already has a note'); - return res.redirect(`/wishlist/${req.params.user}`); - } else { wishlistItem.note = req.body.note; wishlist[i] = wishlistItem; - } } doc.wishlist = wishlist; await db.put(doc);