Skip to content

Commit a606e72

Browse files
committed
feat(NotificationHandler): 메시지 컨버팅 책임 제거
1 parent 67a73d7 commit a606e72

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package com.somemore.notification.handler;
22

3+
import com.somemore.notification.domain.Notification;
4+
35
public interface NotificationHandler {
46

5-
void handle(String message);
7+
void handle(Notification notification);
68
}

src/main/java/com/somemore/notification/handler/NotificationHandlerImpl.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package com.somemore.notification.handler;
22

3-
import com.somemore.notification.converter.MessageConverter;
43
import com.somemore.notification.domain.Notification;
54
import com.somemore.notification.dto.NotificationResponseDto;
65
import com.somemore.notification.repository.NotificationRepository;
@@ -18,8 +17,7 @@ public class NotificationHandlerImpl implements NotificationHandler {
1817
private final SseSender sseSender;
1918

2019
@Override
21-
public void handle(String message) {
22-
Notification notification = MessageConverter.ToNotification(message);
20+
public void handle(Notification notification) {
2321
notificationRepository.save(notification);
2422

2523
sseSender.send(createSseEvent(notification));

0 commit comments

Comments
 (0)