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 2020/09/05 01:17:46 UTC

[incubator-nlpcraft] branch NLPCRAFT-41 updated: Update NCBasicRestApi.scala

This is an automated email from the ASF dual-hosted git repository.

aradzinski pushed a commit to branch NLPCRAFT-41
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git


The following commit(s) were added to refs/heads/NLPCRAFT-41 by this push:
     new 6371b76  Update NCBasicRestApi.scala
6371b76 is described below

commit 6371b76350315329ff5bf8e8263b48531a543efa
Author: Aaron Radzinski <ar...@datalingvo.com>
AuthorDate: Fri Sep 4 18:17:33 2020 -0700

    Update NCBasicRestApi.scala
---
 .../main/scala/org/apache/nlpcraft/server/rest/NCBasicRestApi.scala   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/server/rest/NCBasicRestApi.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/server/rest/NCBasicRestApi.scala
index ed20f2a..06fe21a 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/server/rest/NCBasicRestApi.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/server/rest/NCBasicRestApi.scala
@@ -325,7 +325,7 @@ class NCBasicRestApi extends NCRestApi with LazyLogging with NCOpenCensusTrace w
     @throws[EmptyField]
     protected def checkLength(pairs: (String, Any)*): Unit = {
         pairs.foreach {
-            case (name, value: Some[_]) => checkLengthOpt(name, value)
+            case (name, value: Option[_]) => checkLengthOpt(name, value)
             case (name, value: String) => checkLength(name, value)
             case _ => assert(false)
         }
@@ -339,7 +339,7 @@ class NCBasicRestApi extends NCRestApi with LazyLogging with NCOpenCensusTrace w
     @throws[TooLargeField]
     @throws[EmptyField]
     protected def checkAuth(acsTok: String, extUsrId: Option[String]): Unit = {
-        checkLength("ascTok", acsTok)
+        checkLength("acsTok" -> acsTok)
 
         if (extUsrId.isDefined)
             checkLength("extUsrId", extUsrId.get)