move sql to new model
This commit is contained in:
@@ -75,7 +75,6 @@ fun main(args: Array<String>) {
|
||||
cfg.accessManager(AppAccessManager())
|
||||
}
|
||||
.routes {
|
||||
|
||||
path("/auth") {
|
||||
//for testing, development only
|
||||
get("/endpoint") {
|
||||
@@ -149,6 +148,7 @@ fun main(args: Array<String>) {
|
||||
|
||||
val key = "$AUTH_TOKEN${authUser.userName}"
|
||||
val found = redis.llen(key)
|
||||
logger.warn("for user ${authUser.userName}, found from redis, $key => $found entries")
|
||||
val foundOldAt = (0..found)
|
||||
.mapNotNull { redis.lindex(key, it) }
|
||||
.map { objectMapper.readValue<AuthTokenResponse>(it) }
|
||||
@@ -208,7 +208,6 @@ fun main(args: Array<String>) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
before("/api/*") { ctx ->
|
||||
|
||||
NaiveRateLimit.requestPerTimeUnit(
|
||||
@@ -243,8 +242,6 @@ fun main(args: Array<String>) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
path("/api") {
|
||||
post("/audit/{action}") {
|
||||
logger.warn("User ${currentUser()} of tenant ${currentTenant()} has performed ${it.pathParam("action")} @ ${LocalDateTime.now()}")
|
||||
|
||||
Reference in New Issue
Block a user