diff --git a/src/main/kotlin/andreas311/miso/domain/notification/application/service/EnvironmentNotificationSendService.kt b/src/main/kotlin/andreas311/miso/domain/notification/application/service/EnvironmentNotificationSendService.kt index 419e70d3..2ab9a0ab 100644 --- a/src/main/kotlin/andreas311/miso/domain/notification/application/service/EnvironmentNotificationSendService.kt +++ b/src/main/kotlin/andreas311/miso/domain/notification/application/service/EnvironmentNotificationSendService.kt @@ -19,7 +19,7 @@ class EnvironmentNotificationSendService( deviceTokens = queryDeviceTokenPort.findAll().map { it.deviceToken }, notificationAlarm = NotificationAlarm( title = NotificationType.ENVIRONMENT.title, - content = NotificationType.ENVIRONMENT.content, + body = NotificationType.ENVIRONMENT.body, writer = "미소" ) ) diff --git a/src/main/kotlin/andreas311/miso/domain/notification/application/service/InquiryNotificationSendService.kt b/src/main/kotlin/andreas311/miso/domain/notification/application/service/InquiryNotificationSendService.kt index 688cf49c..8d6292c1 100644 --- a/src/main/kotlin/andreas311/miso/domain/notification/application/service/InquiryNotificationSendService.kt +++ b/src/main/kotlin/andreas311/miso/domain/notification/application/service/InquiryNotificationSendService.kt @@ -23,7 +23,7 @@ class InquiryNotificationSendService( deviceToken = token, notificationAlarm = NotificationAlarm( title = notificationType.title, - content = notificationType.content, + body = notificationType.body, writer = "미소" ) ) diff --git a/src/main/kotlin/andreas311/miso/domain/notification/domain/NotificationAlarm.kt b/src/main/kotlin/andreas311/miso/domain/notification/domain/NotificationAlarm.kt index 6d09bca1..4144fd88 100644 --- a/src/main/kotlin/andreas311/miso/domain/notification/domain/NotificationAlarm.kt +++ b/src/main/kotlin/andreas311/miso/domain/notification/domain/NotificationAlarm.kt @@ -2,6 +2,6 @@ package andreas311.miso.domain.notification.domain data class NotificationAlarm( val title: String, - val content: String, + val body: String, val writer: String ) diff --git a/src/main/kotlin/andreas311/miso/domain/notification/domain/NotificationType.kt b/src/main/kotlin/andreas311/miso/domain/notification/domain/NotificationType.kt index 3dc2485f..4ee275af 100644 --- a/src/main/kotlin/andreas311/miso/domain/notification/domain/NotificationType.kt +++ b/src/main/kotlin/andreas311/miso/domain/notification/domain/NotificationType.kt @@ -2,21 +2,21 @@ package andreas311.miso.domain.notification.domain enum class NotificationType( val title: String, - val content: String + val body: String ) { INQUIRY_WAIT( title = "Miso 문의사항 등록 완료!", - content = "최대한 빠르게 답변 드릴테니 기다려주세요 :)" + body = "최대한 빠르게 답변 드릴테니 기다려주세요 :)" ), INQUIRY_COMPLETE( title = "Miso 문의사항 답변 도착!", - content = "내 문의 내역에서 답변을 확인해주세요 :)" + body = "내 문의 내역에서 답변을 확인해주세요 :)" ), ENVIRONMENT( title = "오늘의 환경 지식을 알고 싶다면?", - content = "Miso 에서 오늘의 환경 지식을 확인해보세요 :)" + body = "Miso 에서 오늘의 환경 지식을 확인해보세요 :)" ) } \ No newline at end of file diff --git a/src/main/kotlin/andreas311/miso/domain/recyclables/application/service/ProcessRecyclablesService.kt b/src/main/kotlin/andreas311/miso/domain/recyclables/application/service/ProcessRecyclablesService.kt index f5919490..24005026 100644 --- a/src/main/kotlin/andreas311/miso/domain/recyclables/application/service/ProcessRecyclablesService.kt +++ b/src/main/kotlin/andreas311/miso/domain/recyclables/application/service/ProcessRecyclablesService.kt @@ -19,7 +19,6 @@ class ProcessRecyclablesService( private val webClient: WebClient, private val queryRecyclablesPort: QueryRecyclablesPort ) : ProcessRecyclablesUseCase { - @Value("\${ai.url}") private val url: String = "" diff --git a/src/main/kotlin/andreas311/miso/thirdparty/firebase/adapter/FcmNotificationAdapter.kt b/src/main/kotlin/andreas311/miso/thirdparty/firebase/adapter/FcmNotificationAdapter.kt index 69d05e01..2152c0c4 100644 --- a/src/main/kotlin/andreas311/miso/thirdparty/firebase/adapter/FcmNotificationAdapter.kt +++ b/src/main/kotlin/andreas311/miso/thirdparty/firebase/adapter/FcmNotificationAdapter.kt @@ -5,7 +5,6 @@ import andreas311.miso.domain.notification.domain.NotificationAlarm import com.google.firebase.messaging.FirebaseMessaging import com.google.firebase.messaging.Message import com.google.firebase.messaging.MulticastMessage -import com.google.firebase.messaging.Notification import org.springframework.stereotype.Component @Component @@ -30,23 +29,14 @@ class FcmNotificationAdapter : FcmNotificationPort { private fun getMassageBuilderByNotification(notificationAlarm: NotificationAlarm) = with(notificationAlarm) { Message.builder() - .setNotification( - Notification.builder() - .setTitle(title) - .setBody(content) - .build() - ) + .putData("title", title) + .putData("body", body) } private fun getMulticastMassageBuilderByNotification(notificationAlarm: NotificationAlarm) = with(notificationAlarm) { MulticastMessage.builder() - .setNotification( - Notification.builder() - .setTitle(title) - .setBody(content) - .build() - ) + .putData("title", title) + .putData("body", body) } - } \ No newline at end of file