add missing await (#69)

This commit is contained in:
Wingy 2022-12-19 17:39:16 -05:00 committed by GitHub
parent afec9afcab
commit 56c2e34081
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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