some debug on WSTimerRoutes.kt

This commit is contained in:
dalbodeule 2024-08-01 21:24:20 +09:00
parent 6b533bcee9
commit 65d491cc8e
No known key found for this signature in database
GPG Key ID: EFA860D069C9FA65

View File

@ -60,13 +60,13 @@ fun Routing.wsTimerRoutes() {
dispatcher.subscribe(TimerEvent::class) { dispatcher.subscribe(TimerEvent::class) {
logger.debug("TimerEvent: {} / {}", it.uid, it.type) logger.debug("TimerEvent: {} / {}", it.uid, it.type)
CoroutineScope(Dispatchers.Default).launch { CoroutineScope(Dispatchers.Default).launch {
sessions[it.uid]?.sendSerialized(TimerResponse(it.type, it.time ?: "")) sessions[it.uid]?.sendSerialized(TimerResponse(it.type.value, it.time ?: ""))
} }
} }
} }
@Serializable @Serializable
data class TimerResponse( data class TimerResponse(
val type: TimerType, val type: Int,
val time: String? val time: String?
) )