aboutsummaryrefslogtreecommitdiff
path: root/kvision-modules/kvision-server-ktor/src/main/kotlin/pl
diff options
context:
space:
mode:
Diffstat (limited to 'kvision-modules/kvision-server-ktor/src/main/kotlin/pl')
-rw-r--r--kvision-modules/kvision-server-ktor/src/main/kotlin/pl/treksoft/kvision/remote/KVModules.kt6
-rw-r--r--kvision-modules/kvision-server-ktor/src/main/kotlin/pl/treksoft/kvision/types/Date.kt2
2 files changed, 4 insertions, 4 deletions
diff --git a/kvision-modules/kvision-server-ktor/src/main/kotlin/pl/treksoft/kvision/remote/KVModules.kt b/kvision-modules/kvision-server-ktor/src/main/kotlin/pl/treksoft/kvision/remote/KVModules.kt
index fef3c3c6..956e7301 100644
--- a/kvision-modules/kvision-server-ktor/src/main/kotlin/pl/treksoft/kvision/remote/KVModules.kt
+++ b/kvision-modules/kvision-server-ktor/src/main/kotlin/pl/treksoft/kvision/remote/KVModules.kt
@@ -53,13 +53,13 @@ fun Application.kvisionInit(vararg modules: Module) {
val injector = Guice.createInjector(MainModule(this), *modules)
intercept(ApplicationCallPipeline.Features) {
- call.attributes.put(INJECTOR_KEY, injector.createChildInjector(CallModule(call)))
+ call.attributes.put(injectorKey, injector.createChildInjector(CallModule(call)))
}
}
-val INJECTOR_KEY = AttributeKey<Injector>("injector")
+val injectorKey = AttributeKey<Injector>("injector")
-val ApplicationCall.injector: Injector get() = attributes[INJECTOR_KEY]
+val ApplicationCall.injector: Injector get() = attributes[injectorKey]
class CallModule(private val call: ApplicationCall) : AbstractModule() {
override fun configure() {
diff --git a/kvision-modules/kvision-server-ktor/src/main/kotlin/pl/treksoft/kvision/types/Date.kt b/kvision-modules/kvision-server-ktor/src/main/kotlin/pl/treksoft/kvision/types/Date.kt
index 678d6828..2cdcc76f 100644
--- a/kvision-modules/kvision-server-ktor/src/main/kotlin/pl/treksoft/kvision/types/Date.kt
+++ b/kvision-modules/kvision-server-ktor/src/main/kotlin/pl/treksoft/kvision/types/Date.kt
@@ -23,7 +23,7 @@ package pl.treksoft.kvision.types
import java.text.SimpleDateFormat
-val KV_DEFAULT_DATE_FORMAT = "yyyy-MM-dd HH:mm:ss"
+const val KV_DEFAULT_DATE_FORMAT = "yyyy-MM-dd HH:mm:ss"
actual typealias Date = java.util.Date