From 64bae1864498142f13db61bf7ec171df957f5da1 Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Tue, 24 Jan 2023 15:27:14 +0300 Subject: [PATCH] Add explicit path to repository in viewer --- .../src/jvmMain/kotlin/ru/inr/mass/data/server/server.kt | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/numass-data-server/src/jvmMain/kotlin/ru/inr/mass/data/server/server.kt b/numass-data-server/src/jvmMain/kotlin/ru/inr/mass/data/server/server.kt index a4925d3..1eb9f8b 100644 --- a/numass-data-server/src/jvmMain/kotlin/ru/inr/mass/data/server/server.kt +++ b/numass-data-server/src/jvmMain/kotlin/ru/inr/mass/data/server/server.kt @@ -35,7 +35,7 @@ public fun main() { embeddedServer(CIO, port, host, module = Application::numassModule).start() } -public fun Application.numassModule() { +public fun Application.numassModule(repositoryName: String = "D:\\Work\\Numass\\data\\test") { val context = Context("Numass") { plugin(NumassProtoPlugin) plugin(NumassCommonPlugin) @@ -45,10 +45,7 @@ public fun Application.numassModule() { val numassCommon = context.fetch(NumassCommonPlugin) val visionManager = numassCommon.visionManager - - val repositroyName = "D:\\Work\\Numass\\data\\test" - - val repository: DataTree = runBlocking { numassProto.readRepository(repositroyName) } + val repository: DataTree = runBlocking { numassProto.readRepository(repositoryName) } routing { resources()