diff --git a/api/src/main/kotlin/com/oksusu/susu/api/event/listener/DiscordErrorAlarmEventListener.kt b/api/src/main/kotlin/com/oksusu/susu/api/event/listener/DiscordErrorAlarmEventListener.kt index 20a9f55a..9a9c2b4f 100644 --- a/api/src/main/kotlin/com/oksusu/susu/api/event/listener/DiscordErrorAlarmEventListener.kt +++ b/api/src/main/kotlin/com/oksusu/susu/api/event/listener/DiscordErrorAlarmEventListener.kt @@ -7,8 +7,6 @@ import com.oksusu.susu.api.extension.remoteIp import com.oksusu.susu.api.extension.requestParam import com.oksusu.susu.client.common.coroutine.ErrorPublishingCoroutineExceptionHandler import com.oksusu.susu.client.discord.DiscordClient -import com.oksusu.susu.client.discord.model.DiscordMessageModel -import com.oksusu.susu.common.extension.format import com.oksusu.susu.common.extension.isProd import com.oksusu.susu.common.extension.mdcCoroutineScope import com.oksusu.susu.common.extension.supressedErrorStack @@ -19,11 +17,9 @@ import kotlinx.coroutines.reactor.awaitSingleOrNull import org.springframework.context.event.EventListener import org.springframework.core.env.Environment import org.springframework.core.io.buffer.DataBufferUtils -import java.time.LocalDateTime - @SusuEventListener -class DiscordErrorAlarmEventListener ( +class DiscordErrorAlarmEventListener( private val environment: Environment, private val discordClient: DiscordClient, private val coroutineExceptionHandler: ErrorPublishingCoroutineExceptionHandler, diff --git a/api/src/main/kotlin/com/oksusu/susu/api/event/listener/SlackErrorAlarmEventListener.kt b/api/src/main/kotlin/com/oksusu/susu/api/event/listener/SlackErrorAlarmEventListener.kt index 48bb5cf4..08bae3f5 100644 --- a/api/src/main/kotlin/com/oksusu/susu/api/event/listener/SlackErrorAlarmEventListener.kt +++ b/api/src/main/kotlin/com/oksusu/susu/api/event/listener/SlackErrorAlarmEventListener.kt @@ -6,11 +6,7 @@ import com.oksusu.susu.api.event.model.SlackErrorAlarmEvent import com.oksusu.susu.api.extension.remoteIp import com.oksusu.susu.api.extension.requestParam import com.oksusu.susu.client.common.coroutine.ErrorPublishingCoroutineExceptionHandler -import com.oksusu.susu.client.discord.DiscordClient -import com.oksusu.susu.client.discord.model.DiscordMessageModel import com.oksusu.susu.client.slack.SlackClient -import com.oksusu.susu.client.slack.model.SlackMessageModel -import com.oksusu.susu.common.extension.format import com.oksusu.susu.common.extension.isProd import com.oksusu.susu.common.extension.mdcCoroutineScope import com.oksusu.susu.common.extension.supressedErrorStack @@ -21,7 +17,6 @@ import kotlinx.coroutines.reactor.awaitSingleOrNull import org.springframework.context.event.EventListener import org.springframework.core.env.Environment import org.springframework.core.io.buffer.DataBufferUtils -import java.time.LocalDateTime @SusuEventListener class SlackErrorAlarmEventListener( @@ -63,4 +58,3 @@ class SlackErrorAlarmEventListener( } } } - diff --git a/api/src/main/kotlin/com/oksusu/susu/api/event/model/ErrorMessage.kt b/api/src/main/kotlin/com/oksusu/susu/api/event/model/ErrorMessage.kt index c1c2d3cc..ae783d86 100644 --- a/api/src/main/kotlin/com/oksusu/susu/api/event/model/ErrorMessage.kt +++ b/api/src/main/kotlin/com/oksusu/susu/api/event/model/ErrorMessage.kt @@ -42,4 +42,3 @@ internal data class ErrorMessage( ) } } - diff --git a/api/src/main/kotlin/com/oksusu/susu/api/exception/advice/ExceptionHandler.kt b/api/src/main/kotlin/com/oksusu/susu/api/exception/advice/ExceptionHandler.kt index a2f2afb9..11345a00 100644 --- a/api/src/main/kotlin/com/oksusu/susu/api/exception/advice/ExceptionHandler.kt +++ b/api/src/main/kotlin/com/oksusu/susu/api/exception/advice/ExceptionHandler.kt @@ -3,7 +3,6 @@ package com.oksusu.susu.api.exception.advice import com.oksusu.susu.api.common.dto.ErrorResponse import com.oksusu.susu.api.event.model.DiscordErrorAlarmEvent import com.oksusu.susu.api.event.model.SentryCaptureExceptionEvent -import com.oksusu.susu.api.event.model.SlackErrorAlarmEvent import io.github.oshai.kotlinlogging.KotlinLogging import jakarta.validation.ConstraintViolationException import kotlinx.coroutines.CancellationException