You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by du...@apache.org on 2019/01/17 17:33:24 UTC
[incubator-openwhisk] branch master updated: during api create,
correctly handle non-default (i.e. "_") namespaces (#4221)
This is an automated email from the ASF dual-hosted git repository.
dubeejw pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk.git
The following commit(s) were added to refs/heads/master by this push:
new ff08ff5 during api create, correctly handle non-default (i.e. "_") namespaces (#4221)
ff08ff5 is described below
commit ff08ff5dcad1a5a62c749dc84e8e5fae73291a36
Author: Mark Deuser <md...@us.ibm.com>
AuthorDate: Thu Jan 17 12:33:18 2019 -0500
during api create, correctly handle non-default (i.e. "_") namespaces (#4221)
* during api create, correctly handle non-default (i.e. "_") namespaces
---
core/routemgmt/common/apigw-utils.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/core/routemgmt/common/apigw-utils.js b/core/routemgmt/common/apigw-utils.js
index fe70170..d66ac3c 100644
--- a/core/routemgmt/common/apigw-utils.js
+++ b/core/routemgmt/common/apigw-utils.js
@@ -853,7 +853,8 @@ function updateNamespace(apidoc, namespace) {
if (apidoc.action) {
// The action namespace does not have to match the CLI user's namespace
// If it is different, leave it alone; otherwise use the replacement namespace
- if (apidoc.namespace === apidoc.action.namespace) {
+ // And only replace when the namespace is the default '_' which needs replacement
+ if (apidoc.action.namespace === '_') {
apidoc.action.namespace = namespace;
apidoc.action.backendUrl = replaceNamespaceInUrl(apidoc.action.backendUrl, namespace); }
}