You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2020/03/08 14:25:30 UTC

[GitHub] [openwhisk] rabbah commented on a change in pull request #4756: Create AES128 and AES256 encryption for parameters

rabbah commented on a change in pull request #4756: Create AES128 and AES256 encryption for parameters
URL: https://github.com/apache/openwhisk/pull/4756#discussion_r368239580
 
 

 ##########
 File path: common/scala/src/main/scala/org/apache/openwhisk/core/entity/Parameter.scala
 ##########
 @@ -80,15 +81,33 @@ protected[core] class Parameters protected[entity] (private val params: Map[Para
     params.keySet filter (params(_).init) map (_.name)
   }
 
+  protected[core] def getMap = {
+    params
+  }
   protected[core] def toJsArray = {
     JsArray(params map { p =>
-      if (p._2.init) {
-        JsObject("key" -> p._1.name.toJson, "value" -> p._2.value.toJson, "init" -> JsTrue)
-      } else JsObject("key" -> p._1.name.toJson, "value" -> p._2.value.toJson)
+      val init = p._2.init match {
 
 Review comment:
   I think it's cleaner to do `init = if (p._2.init) Some("init" -> JsTrue) else None`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services