From 93dd142e756ead1143c5334cb382d5ffeb46d153 Mon Sep 17 00:00:00 2001 From: poojakarma Date: Wed, 27 Nov 2024 12:10:27 +0530 Subject: [PATCH] resolved comments --- src/common/utils/constant.util.ts | 3 ++- src/modules/notification/notification.service.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/common/utils/constant.util.ts b/src/common/utils/constant.util.ts index 45bc327..ec3a3a5 100644 --- a/src/common/utils/constant.util.ts +++ b/src/common/utils/constant.util.ts @@ -20,7 +20,8 @@ export const SUCCESS_MESSAGES = { SMS_NOTIFICATION_SEND_SUCCESSFULLY: 'SMS notification sent successfully', TEMPLATE_CREATED_SUCESSFULLY: (userId) => `Template created successfully by userId: ${userId}`, GET_TEMPLATE: (userId) => `Get Template successfully by userId: ${userId}`, - DELETE_TEMPLATE: (userId) => `Delete Template successfully by userId: ${userId}` + DELETE_TEMPLATE: (userId) => `Delete Template successfully by userId: ${userId}`, + MESSAGES_SAVING_IN_QUEUE: 'Notification saving in queue' }; export const ERROR_MESSAGES = { INVALID_REQUEST: "Invalid request", diff --git a/src/modules/notification/notification.service.ts b/src/modules/notification/notification.service.ts index 209518d..3a84660 100644 --- a/src/modules/notification/notification.service.ts +++ b/src/modules/notification/notification.service.ts @@ -203,7 +203,7 @@ export class NotificationService { } return { status: 200, message: SUCCESS_MESSAGES.NOTIFICATION_QUEUE_SAVE_SUCCESSFULLY }; } catch (error) { - LoggerUtil.error(ERROR_MESSAGES.NOTIFICATION_QUEUE_SAVE_FAILED, error, 'Saving in Qaueue', userId); + LoggerUtil.error(ERROR_MESSAGES.NOTIFICATION_QUEUE_SAVE_FAILED, error, SUCCESS_MESSAGES.MESSAGES_SAVING_IN_QUEUE, userId); throw new Error(ERROR_MESSAGES.NOTIFICATION_QUEUE_SAVE_FAILED); } } else {