aboutsummaryrefslogtreecommitdiff
path: root/kvision-modules/kvision-server-ktor/src/main/kotlin
diff options
context:
space:
mode:
Diffstat (limited to 'kvision-modules/kvision-server-ktor/src/main/kotlin')
-rw-r--r--kvision-modules/kvision-server-ktor/src/main/kotlin/pl/treksoft/kvision/remote/KVModules.kt6
1 files changed, 3 insertions, 3 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() {