Skip to content

Commit

Permalink
fixed regression issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ramgrandhi committed Jul 31, 2020
1 parent a9ca155 commit 7d12c67
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,9 @@ class ServerlessPlugin {
});

// Compare apples-to-apples (configured-to-deployed) and record deployment status
if (this.cache.deployedAPIs.some(deployedAPI => deployedAPI.apiClob === apiDefClob)) {
const apiStatus = this.cache.deployedAPIs.find(deployedAPI => deployedAPI.apiClob === apiDefClob).apiStatus;
const apiId = this.cache.deployedAPIs.find(deployedAPI => deployedAPI.apiClob === apiDefClob).apiId;
if (this.cache.deployedAPIs.some(deployedAPI => deployedAPI.apiClob == apiDefClob)) {
const apiStatus = this.cache.deployedAPIs.find(deployedAPI => deployedAPI.apiClob == apiDefClob).apiStatus;
const apiId = this.cache.deployedAPIs.find(deployedAPI => deployedAPI.apiClob == apiDefClob).apiId;
var invokableAPIURL = null;

// Check for PUBLISHED state, if PUBLISHED then retrieve Invokable API URL
Expand All @@ -247,6 +247,7 @@ class ServerlessPlugin {
apiVersion: apiDef.version,
apiContext: apiDef.rootContext,
apiStatus: apiStatus,
apiId, apiId,
invokableAPIURL: invokableAPIURL + " 🚀",
});
}
Expand All @@ -256,6 +257,7 @@ class ServerlessPlugin {
apiVersion: apiDef.version,
apiContext: apiDef.rootContext,
apiStatus: "TO BE CREATED",
apiId: null,
invokableAPIURL: "TO BE CREATED",
})
}
Expand Down
2 changes: 1 addition & 1 deletion src/2.6.0/wso2apim.js
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ async function uploadCert(url, accessToken, certAlias, certFile, backendUrl) {
// Updates API definition
async function updateAPIDef(url, user, accessToken, gatewayEnv, apiDef, apiId) {
try {
url = "url + "/"" + apiId;
url = url + "/" + apiId;
var data = constructAPIDef(user, gatewayEnv, apiDef, apiId);
var config = {
headers: {
Expand Down

0 comments on commit 7d12c67

Please sign in to comment.