[hotfix] fixed logout redirect and removed unused debug print.

This commit is contained in:
dalbodeule 2025-06-06 15:37:52 +09:00
parent 51232ad593
commit ba9fb052cd
No known key found for this signature in database
GPG Key ID: EFA860D069C9FA65
2 changed files with 1 additions and 4 deletions

View File

@ -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.")

View File

@ -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
} }
} }