move sql to new model

This commit is contained in:
gowthaman.b
2023-11-13 19:59:41 +05:30
parent 5c13e0efdd
commit 25a5852e65
9 changed files with 125 additions and 27 deletions

View File

@@ -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()}")