Fix adding note with item

This commit is contained in:
Wingysam 2018-11-30 16:56:48 -05:00
parent 91614ca46b
commit 24ecd1be28

View file

@ -63,6 +63,7 @@ module.exports = (db) => {
item.name = (productData ? productData.name : req.body.itemUrlOrName); item.name = (productData ? productData.name : req.body.itemUrlOrName);
item.addedBy = req.user._id; item.addedBy = req.user._id;
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;
if (isUrl) item.url = potentialUrl; if (isUrl) item.url = potentialUrl;
item.id = uuid(); item.id = uuid();
const doc = await db.get(req.params.user); const doc = await db.get(req.params.user);