diff options
author | Robert Jaros <rjaros@finn.pl> | 2019-03-09 02:10:39 +0100 |
---|---|---|
committer | Robert Jaros <rjaros@finn.pl> | 2019-03-09 02:10:39 +0100 |
commit | 74439213455a192f82751cfc1b98878620d815b9 (patch) | |
tree | e588ab3491179602efe9dfeb4f0eacc192af26e1 /kvision-modules/kvision-server-ktor/src/main/kotlin/pl | |
parent | 6627d643e3f295b4b42f3875a1591e3ad02a532d (diff) | |
download | kvision-74439213455a192f82751cfc1b98878620d815b9.tar.gz kvision-74439213455a192f82751cfc1b98878620d815b9.tar.bz2 kvision-74439213455a192f82751cfc1b98878620d815b9.zip |
Code style fixes.
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.kt | 6 | ||||
-rw-r--r-- | kvision-modules/kvision-server-ktor/src/main/kotlin/pl/treksoft/kvision/types/Date.kt | 2 |
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 |