From 5b36f082e4d3a5449f86e7de0b9da013bfa5b89a Mon Sep 17 00:00:00 2001 From: x032205 Date: Sun, 31 Aug 2025 23:10:27 -0400 Subject: [PATCH] Small tweaks --- .../src/services/notification/notification-service.ts | 3 +-- .../src/services/notification/notification-types.ts | 11 ----------- frontend/src/hooks/api/notifications/types.ts | 2 +- 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/backend/src/services/notification/notification-service.ts b/backend/src/services/notification/notification-service.ts index 673d02a5e..5e0f96add 100644 --- a/backend/src/services/notification/notification-service.ts +++ b/backend/src/services/notification/notification-service.ts @@ -51,8 +51,7 @@ export const notificationServiceFactory = ({ await userNotificationDAL.update( { id: notificationId, - userId, - isRead: false + userId }, { isRead: true diff --git a/backend/src/services/notification/notification-types.ts b/backend/src/services/notification/notification-types.ts index ecf3cafcd..2ac65cf38 100644 --- a/backend/src/services/notification/notification-types.ts +++ b/backend/src/services/notification/notification-types.ts @@ -2,17 +2,6 @@ export enum NotificationType { ACCESS_APPROVAL_REQUEST = "access-approval-request" } -export interface TUserNotification { - id: string; - userId: string; - type: string; - title: string; - body?: string | null; - link?: string | null; - isRead: boolean; - createdAt: Date; -} - export interface TCreateUserNotificationDTO { userId: string; type: NotificationType; diff --git a/frontend/src/hooks/api/notifications/types.ts b/frontend/src/hooks/api/notifications/types.ts index 8d5663a7c..97552046c 100644 --- a/frontend/src/hooks/api/notifications/types.ts +++ b/frontend/src/hooks/api/notifications/types.ts @@ -6,5 +6,5 @@ export interface TUserNotification { body?: string | null; link?: string | null; isRead: boolean; - createdAt: Date; + createdAt: string; }