mirror of
https://github.com/dalbodeule/chibot-chzzk-bot.git
synced 2025-06-09 07:18:22 +00:00
fix User.kt
- set "discord", "token" row to nullable.
This commit is contained in:
parent
f2a871d664
commit
0f175ab045
@ -93,14 +93,14 @@ fun Routing.apiRoutes() {
|
||||
user = UserService.saveUser(session.nickname, session.id)
|
||||
}
|
||||
val songConfig = SongConfigService.getConfig(user)
|
||||
val status = getStreamInfo(user.token!!)
|
||||
val status = user.token?.let { it1 -> getStreamInfo(it1) }
|
||||
|
||||
if(status.content == null) {
|
||||
if(status?.content == null) {
|
||||
call.respondText(user.naverId, status = HttpStatusCode.NotFound)
|
||||
}
|
||||
|
||||
call.respond(HttpStatusCode.OK, GetSessionDTO(
|
||||
status.content!!.channel.channelId,
|
||||
status!!.content!!.channel.channelId,
|
||||
status.content!!.channel.channelName,
|
||||
status.content!!.status == "OPEN",
|
||||
status.content!!.channel.channelImageUrl,
|
||||
|
Loading…
x
Reference in New Issue
Block a user