Configure SongListWebSocketManager in wsSongListRoutes.

This change adds a `SongListWebSocketManager` instance with a logger to the `wsSongListRoutes` setup. It improves manageability and ensures better logging for WebSocket interactions in the song list route.
This commit is contained in:
dalbodeule 2025-04-24 16:01:16 +09:00
parent 02cede87f8
commit 7a84a9e437
No known key found for this signature in database
GPG Key ID: EFA860D069C9FA65

View File

@ -22,9 +22,11 @@ import io.ktor.server.websocket.*
import kotlinx.coroutines.delay
import kotlinx.serialization.Serializable
import kotlinx.serialization.json.Json
import org.slf4j.LoggerFactory
import space.mori.chzzk_bot.common.services.UserService
import space.mori.chzzk_bot.webserver.routes.*
import space.mori.chzzk_bot.webserver.utils.DiscordRatelimits
import space.mori.chzzk_bot.webserver.utils.SongListWebSocketManager
import wsSongListRoutes
import java.math.BigInteger
import java.security.SecureRandom
@ -223,7 +225,7 @@ val server = embeddedServer(Netty, port = 8080, ) {
wsTimerRoutes()
wsSongRoutes()
wsSongListRoutes()
wsSongListRoutes(SongListWebSocketManager(LoggerFactory.getLogger("wsSongListRoutes")))
swaggerUI("swagger-ui/index.html", "openapi/documentation.yaml") {
options {