notifications tests

This commit is contained in:
Matteo Pagliazzi
2020-03-01 21:29:57 +01:00
parent a11e4d0512
commit 6deee0ffc8
3 changed files with 24 additions and 36 deletions

View File

@@ -93,6 +93,7 @@ export const schema = new Schema({
* Called by user's post init hook (models/user/hooks.js)
*/
schema.statics.cleanupCorruptData = function cleanupCorruptNotificationsData (notifications) {
console.log('fixing stuff', notifications);
if (!notifications) return notifications;
let filteredNotifications = notifications.filter(notification => {