From 6f13cda3240de9a9638e7a55a16072ce13029675 Mon Sep 17 00:00:00 2001 From: Marek Libra Date: Tue, 27 Feb 2024 14:39:58 +0100 Subject: [PATCH] chore: clean up after adding createdAfter filter Signed-off-by: Marek Libra --- .../src/database/DatabaseNotificationsStore.ts | 1 - plugins/notifications-backend/src/service/router.ts | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/notifications-backend/src/database/DatabaseNotificationsStore.ts b/plugins/notifications-backend/src/database/DatabaseNotificationsStore.ts index afd94fd69d..0ff1d10c56 100644 --- a/plugins/notifications-backend/src/database/DatabaseNotificationsStore.ts +++ b/plugins/notifications-backend/src/database/DatabaseNotificationsStore.ts @@ -99,7 +99,6 @@ export class DatabaseNotificationsStore implements NotificationsStore { ) => { const { user } = options; const isSQLite = this.db.client.config.client.includes('sqlite3'); - // const isPsql = this.db.client.config.client.includes('pg'); const query = this.db('notification').where('user', user); diff --git a/plugins/notifications-backend/src/service/router.ts b/plugins/notifications-backend/src/service/router.ts index 45a9c56e59..b99350e9e4 100644 --- a/plugins/notifications-backend/src/service/router.ts +++ b/plugins/notifications-backend/src/service/router.ts @@ -205,7 +205,7 @@ export async function createRouter( // or keep undefined } if (req.query.created_after) { - const sinceEpoch = Date.parse(req.query.created_after.toString()); + const sinceEpoch = Date.parse(String(req.query.created_after)); if (isNaN(sinceEpoch)) { throw new InputError('Unexpected date format'); }