fix: do not make query if no notification type is requested

This commit is contained in:
Eana Hufwe 2024-05-24 17:25:11 +00:00 committed by naskya
parent 440d961ab4
commit 33b45d1d22
No known key found for this signature in database
GPG key ID: 712D413B3A9FED5C

View file

@ -38,6 +38,8 @@ export class NotificationHelpers {
requestedTypes = requestedTypes.filter((p) => !excludedTypes.includes(p));
}
if (!requestedTypes.length) return [];
const query = PaginationHelpers.makePaginationQuery(
Notifications.createQueryBuilder("notification"),
sinceId,