diff --git a/src/comment/comment.service.ts b/src/comment/comment.service.ts index 139f6b7..0ed863f 100644 --- a/src/comment/comment.service.ts +++ b/src/comment/comment.service.ts @@ -37,10 +37,10 @@ export class CommentService { const notification = new NotificationEntity(); notification.notificationReceiver = invitation.member; - notification.notificationType = 'COMMENT'; - notification.notificationContent = - NotificationService.createNotificationContent('LIKE', user.nickname); - notification.notificationItemId = rule.id; + notification.notificationSender = user; + notification.notificationTargetType = 'RULE'; + notification.notificationTargetId = rule.id; + notification.notificationAction = 'COMMENT'; await notification.save(); } } diff --git a/src/signature/signature.service.ts b/src/signature/signature.service.ts index 8e859e4..24196a0 100644 --- a/src/signature/signature.service.ts +++ b/src/signature/signature.service.ts @@ -274,10 +274,10 @@ export class SignatureService { // Todo: 좋아요를 했다가 해제한 경우에 알림을 어떻게 처리할 것인가? const notification = new NotificationEntity(); notification.notificationReceiver = signature.user; - notification.notificationType = 'LIKE'; - notification.notificationContent = - NotificationService.createNotificationContent('LIKE', loginUser.nickname); - notification.notificationItemId = signature.id; + notification.notificationSender = loginUser; + notification.notificationTargetType = 'SIGNATURE'; + notification.notificationTargetId = signature.id; + notification.notificationAction = 'LIKE'; await notification.save(); return signature;