You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nlpcraft.apache.org by ar...@apache.org on 2021/01/13 20:20:04 UTC
[incubator-nlpcraft] branch master updated: Fix for NLPCRAFT-217.
This is an automated email from the ASF dual-hosted git repository.
aradzinski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git
The following commit(s) were added to refs/heads/master by this push:
new 7623bc5 Fix for NLPCRAFT-217.
7623bc5 is described below
commit 7623bc5bcf2fadabb8c7e39bd866b05a2d6a0875
Author: Aaron Radzinski <ar...@datalingvo.com>
AuthorDate: Wed Jan 13 12:19:53 2021 -0800
Fix for NLPCRAFT-217.
---
.../main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCli.scala | 4 ++--
nlpcraft/src/main/scala/org/apache/nlpcraft/server/NCServer.scala | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCli.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCli.scala
index 280c679..52f7f86 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCli.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCli.scala
@@ -1544,7 +1544,7 @@ object NCCli extends App {
tbl += (" Pool increment", s"${g(beacon.dbPoolInc)}")
tbl += (" Reset on start", s"${g(beacon.dbInit)}")
tbl += ("REST:", "")
- tbl += (" Endpoint", s"${g("http://" + beacon.restEndpoint)}") // TODO: https?
+ tbl += (" Endpoint", s"${g("http://" + beacon.restEndpoint)}")
tbl += (" API provider", s"${g(beacon.restApi)}")
tbl += ("Probe:", "")
tbl += (" Uplink", s"${g(beacon.upLink)}")
@@ -2690,7 +2690,7 @@ object NCCli extends App {
* @return
*/
private def prepRestUrl(baseUrl: String, cmd: String): String =
- if (baseUrl.endsWith("/")) s"${baseUrl}api/v1/$cmd" else s"$baseUrl/api/v1/$cmd"
+ if (baseUrl.endsWith("/")) s"$baseUrl$cmd" else s"$baseUrl/$cmd"
/**
* Posts HTTP POST request.
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/server/NCServer.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/server/NCServer.scala
index a797813..df113ce 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/server/NCServer.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/server/NCServer.scala
@@ -258,7 +258,7 @@ object NCServer extends App with NCIgniteInstance with LazyLogging with NCOpenCe
lazy val nlpEngine = getString("nlpcraft.nlpEngine")
lazy val extCfgUrl = getString("nlpcraft.extConfig.extUrl")
lazy val extCfgCheckMd5 = getBool("nlpcraft.extConfig.checkMd5")
- lazy val restEndpoint = s"${Config.restHost}:${Config.restPort}"
+ lazy val restEndpoint = s"${Config.restHost}:${Config.restPort}/api/v1"
}
try {