Skip to content

Commit

Permalink
fix(notifications): unable to clear all notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
polonel committed Jan 27, 2019
1 parent 88409c1 commit 4f24c8c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/models/notification.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ notificationSchema.statics.clearNotifications = function (oId, callback) {
return callback('Invalid UserId - NotificationSchema.ClearNotifications()', null)
}

return this.model(COLLECTION).deleteOne({ owner: oId }, callback)
return this.model(COLLECTION).deleteMany({ owner: oId }, callback)
}

module.exports = mongoose.model(COLLECTION, notificationSchema)

0 comments on commit 4f24c8c

Please sign in to comment.