mirror of
https://github.com/dalbodeule/chibot-chzzk-bot.git
synced 2025-06-09 07:18:22 +00:00
debug on loading (6x)
This commit is contained in:
parent
be057c59e1
commit
b7985ff72c
@ -100,6 +100,21 @@ fun Route.apiDiscordRoutes() {
|
|||||||
call.respond(HttpStatusCode.OK, guild)
|
call.respond(HttpStatusCode.OK, guild)
|
||||||
return@get
|
return@get
|
||||||
}
|
}
|
||||||
|
get("/guilds") {
|
||||||
|
val session = call.sessions.get<UserSession>()
|
||||||
|
if(session == null) {
|
||||||
|
call.respond(HttpStatusCode.BadRequest, "Session is required")
|
||||||
|
return@get
|
||||||
|
}
|
||||||
|
val user = UserService.getUserWithNaverId(session.id)
|
||||||
|
if(user == null) {
|
||||||
|
call.respond(HttpStatusCode.BadRequest, "User does not exist")
|
||||||
|
return@get
|
||||||
|
}
|
||||||
|
|
||||||
|
call.respond(HttpStatusCode.OK, DiscordGuildCache.getCachedGuilds(session.discordGuildList))
|
||||||
|
return@get
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user