Add token renewal backend

This commit is contained in:
2020-04-26 00:49:42 +02:00
parent 9d1d1b3afb
commit 8061c15b04
10 changed files with 114 additions and 62 deletions
+7 -1
View File
@@ -44,7 +44,13 @@ class UserService(override val kodein: Kodein) : KodeinAware {
return db.from(Users)
.select(Users.id)
.where { (Users.username eq username) or (Users.email eq email) }
.limit(0, 1)
.firstOrNull() != null
}
fun userExists(userId: Int): Boolean {
return db.from(Users)
.select(Users.id)
.where { Users.id eq userId }
.firstOrNull() != null
}