mirror of
https://github.com/dalbodeule/chibot-chzzk-bot.git
synced 2025-06-09 07:18:22 +00:00
add Session flows (1x)
- fix APIRoutes
This commit is contained in:
parent
369d5491e8
commit
561ab188b2
@ -87,9 +87,9 @@ val server = embeddedServer(Netty, port = 8080, ) {
|
|||||||
}
|
}
|
||||||
}.body()
|
}.body()
|
||||||
|
|
||||||
call.sessions.set(userInfo.response?.let { it1 ->
|
call.sessions.set(userInfo.response?.let { profile ->
|
||||||
UserSession(state,
|
UserSession(state,
|
||||||
it1.id, it1.nickname, it1.profile_image)
|
profile.id, profile.nickname, profile.profile_image)
|
||||||
})
|
})
|
||||||
|
|
||||||
redirects[state]?.let { redirect ->
|
redirects[state]?.let { redirect ->
|
||||||
|
@ -72,6 +72,7 @@ fun Routing.apiRoutes() {
|
|||||||
call.respondText("No session found", status = HttpStatusCode.NotFound)
|
call.respondText("No session found", status = HttpStatusCode.NotFound)
|
||||||
return@get
|
return@get
|
||||||
}
|
}
|
||||||
|
println(session)
|
||||||
val user = UserService.getUserWithNaverId(session.id.toLong())
|
val user = UserService.getUserWithNaverId(session.id.toLong())
|
||||||
if(user == null) {
|
if(user == null) {
|
||||||
call.respondText("No session found", status = HttpStatusCode.NotFound)
|
call.respondText("No session found", status = HttpStatusCode.NotFound)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user