add missing await (#69)
This commit is contained in:
parent
afec9afcab
commit
56c2e34081
1 changed files with 1 additions and 1 deletions
|
@ -133,7 +133,7 @@ module.exports = (db) => {
|
||||||
router.post('/:user/remove/:itemId', verifyAuth(), async (req, res) => {
|
router.post('/:user/remove/:itemId', verifyAuth(), async (req, res) => {
|
||||||
try {
|
try {
|
||||||
const wishlist = await wishlistManager.get(req.params.user)
|
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 isOwnWishlist = req.user._id === wishlist.username
|
||||||
const addedByUser = item.addedBy === req.user._id
|
const addedByUser = item.addedBy === req.user._id
|
||||||
|
|
Loading…
Reference in a new issue