From 8b3af1adc003d5a7c58c72646ed4da1e8ce2fab8 Mon Sep 17 00:00:00 2001 From: gowthaman Date: Thu, 23 May 2024 13:41:33 +0530 Subject: [PATCH] remove stuff --- src/main/kotlin/com/restapi/domain/db.kt | 31 ------------------------ 1 file changed, 31 deletions(-) diff --git a/src/main/kotlin/com/restapi/domain/db.kt b/src/main/kotlin/com/restapi/domain/db.kt index 28b1823..36fe1ce 100644 --- a/src/main/kotlin/com/restapi/domain/db.kt +++ b/src/main/kotlin/com/restapi/domain/db.kt @@ -138,28 +138,6 @@ object Session { } - fun a() { - val a = HashMap() - a.put("a", "b"); - a.put("a", "b"); - a.put("a", "b"); - a.put("a", "b"); - - val b = HashMap().apply { - put("a", "b"); - put("a", "b"); - put("a", "b"); - put("a", "b"); - } - - val c: String? = "" - val x = c?.get(1) - - c?.apply { - //will work only when c is not null - } - } - private val sc = DatabaseConfig().apply { loadFromProperties(Properties().apply { setProperty("datasource.db.username", appConfig.dbUser()) @@ -183,7 +161,6 @@ object Session { fun currentUser() = currentUser.get().userName fun currentTenant() = currentUser.get().tenant fun currentRoles() = currentUser.get().roles - fun currentToken() = currentUser.get().token fun currentUserPlants() = currentUser.get().plantIds.mapNotNull { database.find(Plant::class.java) .where() @@ -219,14 +196,6 @@ object Session { return "$entity-${"$s".padStart(6, '0')}" } - val redisUri = appConfig.redisUri().getOrDefault("redis://localhost:6379/0") - val redis = JedisPooled(redisUri) - - init { - - logger.warn("RedisUri - $redisUri") - } - } object DataNotFoundException : Exception() {