From 3bd22e800878c7812570a76a5a2847121552e0da Mon Sep 17 00:00:00 2001 From: Anand Chowdhary Date: Fri, 31 May 2019 18:55:42 +0200 Subject: [PATCH] :bug: Fix bug with notification read --- src/crud/notification.ts | 2 +- src/interfaces/tables/user.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/crud/notification.ts b/src/crud/notification.ts index 23a44459b..2d2f22635 100644 --- a/src/crud/notification.ts +++ b/src/crud/notification.ts @@ -16,7 +16,7 @@ import { dateToDateTime } from "../helpers/utils"; export const createNotification = async (notification: Notification) => { notification.createdAt = new Date(); notification.updatedAt = notification.createdAt; - notification.isRead = !!notification.isRead; + notification.read = !!notification.read; deleteItemFromCache(CacheCategories.USER_NOTIFICATIONS, notification.userId); return await query( `INSERT INTO notifications ${tableValues(notification)}`, diff --git a/src/interfaces/tables/user.ts b/src/interfaces/tables/user.ts index 42805468b..29660cb9e 100644 --- a/src/interfaces/tables/user.ts +++ b/src/interfaces/tables/user.ts @@ -48,7 +48,7 @@ export interface Notification { category: NotificationCategories; text: string; link: string; - isRead?: boolean; + read?: boolean; createdAt?: Date; updatedAt?: Date; }