diff options
author | Robert Jaros <rjaros@finn.pl> | 2019-02-16 22:59:41 +0100 |
---|---|---|
committer | Robert Jaros <rjaros@finn.pl> | 2019-02-16 22:59:41 +0100 |
commit | 7ffd9224fdc542618211648df0b5361abeaf098d (patch) | |
tree | 3aaa454319a7ac502b1b1ea712d9f6d776a149d7 | |
parent | 7120b09bfebb7ab0c562c6b5db7d63a1b9a772d5 (diff) | |
download | kvision-7ffd9224fdc542618211648df0b5361abeaf098d.tar.gz kvision-7ffd9224fdc542618211648df0b5361abeaf098d.tar.bz2 kvision-7ffd9224fdc542618211648df0b5361abeaf098d.zip |
Code style fix
2 files changed, 4 insertions, 5 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 e322aec5..4ca27ebd 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 @@ -57,13 +57,13 @@ fun Application.kvisionInit(vararg modules: Module) { val injector = Guice.createInjector(MainModule(this), *modules) intercept(ApplicationCallPipeline.Features) { - call.attributes.put(InjectorKey, injector.createChildInjector(CallModule(call))) + call.attributes.put(INJECTOR_KEY, injector.createChildInjector(CallModule(call))) } } -val InjectorKey = AttributeKey<Injector>("injector") +val INJECTOR_KEY = AttributeKey<Injector>("injector") -val ApplicationCall.injector: Injector get() = attributes[InjectorKey] +val ApplicationCall.injector: Injector get() = attributes[INJECTOR_KEY] class CallModule(private val call: ApplicationCall) : AbstractModule() { override fun configure() { diff --git a/kvision-modules/kvision-server-spring-boot/src/main/kotlin/pl/treksoft/kvision/remote/KVController.kt b/kvision-modules/kvision-server-spring-boot/src/main/kotlin/pl/treksoft/kvision/remote/KVController.kt index f8006857..13b95b8b 100644 --- a/kvision-modules/kvision-server-spring-boot/src/main/kotlin/pl/treksoft/kvision/remote/KVController.kt +++ b/kvision-modules/kvision-server-spring-boot/src/main/kotlin/pl/treksoft/kvision/remote/KVController.kt @@ -60,5 +60,4 @@ open class KVController { res.status = HttpServletResponse.SC_NOT_FOUND } } - -}
\ No newline at end of file +} |