mirror of
https://github.com/dalbodeule/chibot-chzzk-bot.git
synced 2025-06-09 07:18:22 +00:00
fix User.kt(4x)
- fun enable fix
This commit is contained in:
parent
81c62d6c55
commit
e342a3aabb
@ -129,6 +129,7 @@ val server = embeddedServer(Netty, port = 8080, ) {
|
||||
allowMethod(HttpMethod.Get)
|
||||
allowHost(dotenv["FRONTEND"] ?: "localhost:3000", schemes=listOf("https"))
|
||||
allowCredentials = true
|
||||
allowNonSimpleContentTypes = true
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,7 @@ data class RegisterChzzkUserDTO(
|
||||
)
|
||||
|
||||
fun Routing.apiRoutes() {
|
||||
val chzzkIDRegex = """(?:.+chzzk\.naver\.com/)?([a-f0-9]{32})?(?:/live)?${'$'}""".toRegex()
|
||||
val chzzkIDRegex = """(?:.+chzzk\.naver\.com/)?([a-f0-9]{32})?(?:/live)?${'$'}/.+""".toRegex()
|
||||
val dispatcher: CoroutinesEventBus by inject(CoroutinesEventBus::class.java)
|
||||
|
||||
route("/") {
|
||||
@ -97,10 +97,11 @@ fun Routing.apiRoutes() {
|
||||
|
||||
if(status?.content == null) {
|
||||
call.respondText(user.naverId, status = HttpStatusCode.NotFound)
|
||||
return@get
|
||||
}
|
||||
|
||||
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