add Session flows (2x)

- fix APIRoutes (debug Naver UserID)
This commit is contained in:
dalbodeule 2024-08-08 17:39:43 +09:00
parent fb3470ae83
commit 6b60e2c698
No known key found for this signature in database
GPG Key ID: EFA860D069C9FA65

View File

@ -41,7 +41,7 @@ fun Routing.wsSongListRoutes() {
webSocket("/songlist") {
val session = call.sessions.get<UserSession>()
val user = session?.id?.let { UserService.getUserWithNaverId( it.toLong() ) }
val user = session?.id?.let { UserService.getUserWithNaverId( it ) }
if (user == null) {
close(CloseReason(CloseReason.Codes.CANNOT_ACCEPT, "Invalid SID"))
return@webSocket