Added spread operator to value in db update

This commit is contained in:
mserranom 2020-04-01 15:28:29 +02:00
parent 7183b88a37
commit a7311ff5d3

View file

@ -87,7 +87,7 @@ module.exports = Notifications = {
}
return db.notifications.update(
{ user_id: doc.user_id, key: notification.key },
{ $set : doc },
{ $set : { ...doc } },
{ upsert: true },
callback
)