offset: start,
limit: count,
sort,
- where,
- sequelize: this.sequelize
+ where
}
if (unread !== undefined) query.where['read'] = !unread
count === 0
? [] as UserNotificationModelForApi[]
- : new UserNotificationListQueryBuilder(query).listNotifications()
+ : new UserNotificationListQueryBuilder(this.sequelize, query).listNotifications()
]).then(([ total, data ]) => ({ total, data }))
}