Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Commit

Permalink
🐛 Fix bug with notification read
Browse files Browse the repository at this point in the history
  • Loading branch information
AnandChowdhary committed May 31, 2019
1 parent c9d5e02 commit 3bd22e8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/crud/notification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)}`,
Expand Down
2 changes: 1 addition & 1 deletion src/interfaces/tables/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export interface Notification {
category: NotificationCategories;
text: string;
link: string;
isRead?: boolean;
read?: boolean;
createdAt?: Date;
updatedAt?: Date;
}

0 comments on commit 3bd22e8

Please sign in to comment.