mirror of
https://github.com/dalbodeule/chibot-chzzk-bot.git
synced 2025-06-09 15:28:21 +00:00
Merge pull request #19 from dalbodeule/develop
some debug on WSTimerRoutes.kt
This commit is contained in:
commit
070df6b68b
@ -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?
|
||||||
)
|
)
|
Loading…
x
Reference in New Issue
Block a user