findandupdate return null with promise all - mongoose
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
1
I am trying to create a nodejs API separated by controllers and routes. I am trying to findandupdate in multiple collections and then put them in multiple promises to return a single response but i get just a null what am i doing wrong below ? controller.js var x = (req, res, next, userID, product) => { let query = { uid: userID } let update = { $push: { product: product, } } let options = { safe: true, new: true, upsert: true } Model.findOneAndUpdate(query, update, options).exec() .then(result => { re...
