diff options
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 +} |