diff options
Diffstat (limited to 'server/models/user/user-notification.ts')
-rw-r--r-- | server/models/user/user-notification.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/server/models/user/user-notification.ts b/server/models/user/user-notification.ts index eca127e7e..6209cb4bf 100644 --- a/server/models/user/user-notification.ts +++ b/server/models/user/user-notification.ts | |||
@@ -249,8 +249,7 @@ export class UserNotificationModel extends Model<Partial<AttributesOnly<UserNoti | |||
249 | offset: start, | 249 | offset: start, |
250 | limit: count, | 250 | limit: count, |
251 | sort, | 251 | sort, |
252 | where, | 252 | where |
253 | sequelize: this.sequelize | ||
254 | } | 253 | } |
255 | 254 | ||
256 | if (unread !== undefined) query.where['read'] = !unread | 255 | if (unread !== undefined) query.where['read'] = !unread |
@@ -261,7 +260,7 @@ export class UserNotificationModel extends Model<Partial<AttributesOnly<UserNoti | |||
261 | 260 | ||
262 | count === 0 | 261 | count === 0 |
263 | ? [] as UserNotificationModelForApi[] | 262 | ? [] as UserNotificationModelForApi[] |
264 | : new UserNotificationListQueryBuilder(query).listNotifications() | 263 | : new UserNotificationListQueryBuilder(this.sequelize, query).listNotifications() |
265 | ]).then(([ total, data ]) => ({ total, data })) | 264 | ]).then(([ total, data ]) => ({ total, data })) |
266 | } | 265 | } |
267 | 266 | ||