Merge pull request #19 from dalbodeule/develop

some debug on WSTimerRoutes.kt
This commit is contained in:
JinU Choi 2024-08-01 21:26:35 +09:00 committed by GitHub
commit 070df6b68b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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?
) )