mirror of
https://github.com/dalbodeule/chibot-chzzk-bot.git
synced 2025-06-08 14:58:21 +00:00
[hotfix] fixed logout redirect and removed unused debug print.
This commit is contained in:
parent
51232ad593
commit
ba9fb052cd
@ -223,8 +223,6 @@ class UserHandler(
|
|||||||
throw RuntimeException("AccessToken or RefreshToken is not valid.")
|
throw RuntimeException("AccessToken or RefreshToken is not valid.")
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
println(user.refreshToken)
|
|
||||||
|
|
||||||
val tokens = user.refreshToken?.let { token -> Connector.client.refreshAccessToken(token)}
|
val tokens = user.refreshToken?.let { token -> Connector.client.refreshAccessToken(token)}
|
||||||
if(tokens == null) {
|
if(tokens == null) {
|
||||||
throw RuntimeException("AccessToken is not valid.")
|
throw RuntimeException("AccessToken is not valid.")
|
||||||
|
@ -228,8 +228,7 @@ val server = embeddedServer(Netty, port = 8080, ) {
|
|||||||
// common: logout
|
// common: logout
|
||||||
get("/logout") {
|
get("/logout") {
|
||||||
call.sessions.clear<UserSession>()
|
call.sessions.clear<UserSession>()
|
||||||
call.response.status(HttpStatusCode.OK)
|
call.respondRedirect(getFrontendURL(""))
|
||||||
return@get
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user