From 4f24c8c151374023db1b8181a1bb95456a307a9a Mon Sep 17 00:00:00 2001 From: Chris Brame Date: Sun, 27 Jan 2019 01:11:13 -0500 Subject: [PATCH] fix(notifications): unable to clear all notifications --- src/models/notification.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/models/notification.js b/src/models/notification.js index 90fc82921..25479aa7e 100644 --- a/src/models/notification.js +++ b/src/models/notification.js @@ -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)