From f8a6826ebeb5be89b85d42d25afc2c1228f5ebc0 Mon Sep 17 00:00:00 2001 From: ainouzgali Date: Tue, 16 May 2023 15:40:29 +0300 Subject: [PATCH] fix: sort by created at for activity feed --- .../dal/src/repositories/notification/notification.repository.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/libs/dal/src/repositories/notification/notification.repository.ts b/libs/dal/src/repositories/notification/notification.repository.ts index e20610e3135..f0bb504403a 100644 --- a/libs/dal/src/repositories/notification/notification.repository.ts +++ b/libs/dal/src/repositories/notification/notification.repository.ts @@ -103,6 +103,7 @@ export class NotificationRepository extends BaseRepository< .populate({ options: { readPreference: 'secondaryPreferred', + sort: { createdAt: 1 }, }, path: 'jobs', match: {