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 (debug Naver UserID)
This commit is contained in:
parent
561ab188b2
commit
172885ae38
@ -10,7 +10,7 @@ object Users: IntIdTable("users") {
|
||||
val username = varchar("username", 255)
|
||||
val token = varchar("token", 64)
|
||||
val discord = long("discord")
|
||||
val naverId = long("naver_id")
|
||||
val naverId = varchar('naver_id', 128)
|
||||
val liveAlertGuild = long("live_alert_guild").nullable()
|
||||
val liveAlertChannel = long("live_alert_channel").nullable()
|
||||
val liveAlertMessage = text("live_alert_message").nullable()
|
||||
|
@ -47,7 +47,7 @@ object UserService {
|
||||
}
|
||||
}
|
||||
|
||||
fun getUserWithNaverId(naverId: Long): User? {
|
||||
fun getUserWithNaverId(naverId: String): User? {
|
||||
return transaction {
|
||||
val users = User.find(Users.naverId eq naverId)
|
||||
|
||||
|
@ -73,7 +73,7 @@ fun Routing.apiRoutes() {
|
||||
return@get
|
||||
}
|
||||
println(session)
|
||||
val user = UserService.getUserWithNaverId(session.id.toLong())
|
||||
val user = UserService.getUserWithNaverId(session.id)
|
||||
if(user == null) {
|
||||
call.respondText("No session found", status = HttpStatusCode.NotFound)
|
||||
return@get
|
||||
|
Loading…
x
Reference in New Issue
Block a user