From 56c2e3408104399a2e19d259798a153e34bc6e01 Mon Sep 17 00:00:00 2001 From: Wingy Date: Mon, 19 Dec 2022 17:39:16 -0500 Subject: [PATCH] add missing await (#69) --- src/routes/wishlist/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/wishlist/index.js b/src/routes/wishlist/index.js index 3e8056a..45cd21b 100644 --- a/src/routes/wishlist/index.js +++ b/src/routes/wishlist/index.js @@ -133,7 +133,7 @@ module.exports = (db) => { router.post('/:user/remove/:itemId', verifyAuth(), async (req, res) => { try { const wishlist = await wishlistManager.get(req.params.user) - const item = wishlist.get(req.params.itemId) + const item = await wishlist.get(req.params.itemId) const isOwnWishlist = req.user._id === wishlist.username const addedByUser = item.addedBy === req.user._id