Skip to content
This repository was archived by the owner on Dec 14, 2022. It is now read-only.

Commit 183cc64

Browse files
author
Chris Wiechmann
committed
Global variables used - May lead to race conditions
Fixes #75
1 parent 89b3694 commit 183cc64

File tree

2 files changed

+6
-6
lines changed
  • apibuilder4elastic/custom_flow_nodes/api-builder-plugin-axway-api-management/src

2 files changed

+6
-6
lines changed

apibuilder4elastic/custom_flow_nodes/api-builder-plugin-axway-api-management/src/actions.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ async function _getCurrentGWUser(requestHeaders) {
368368
headers: requestHeaders,
369369
agent: new https.Agent({ rejectUnauthorized: false })
370370
};
371-
loginName = await sendRequest(pluginConfig.apigateway.url, options)
371+
const loginName = await sendRequest(pluginConfig.apigateway.url, options)
372372
.then(response => {
373373
return response.body.result;
374374
})
@@ -475,7 +475,7 @@ async function _getCurrentGWPermissions(requestHeaders, loginName) {
475475
headers: requestHeaders,
476476
agent: new https.Agent({ rejectUnauthorized: false })
477477
};
478-
result = await sendRequest(pluginConfig.apigateway.url, options)
478+
const result = await sendRequest(pluginConfig.apigateway.url, options)
479479
.then(response => {
480480
return response.body.result;
481481
})
@@ -497,7 +497,7 @@ async function _getManagerUser(user, groupId) {
497497
},
498498
agent: new https.Agent({ rejectUnauthorized: false })
499499
};
500-
managerUser = await sendRequest(apiManagerConfig.url, options)
500+
const managerUser = await sendRequest(apiManagerConfig.url, options)
501501
.then(response => {
502502
return response.body;
503503
})
@@ -567,7 +567,7 @@ async function _getOrganization(apiProxy, groupId, region, options) {
567567
},
568568
agent: new https.Agent({ rejectUnauthorized: false })
569569
};
570-
org = await sendRequest(apiManagerConfig.url, options)
570+
const org = await sendRequest(apiManagerConfig.url, options)
571571
.then(response => {
572572
if(!response.body) {
573573
throw new Error(`Organization with : '${orgId}' not found in API-Manager.`);
@@ -604,7 +604,7 @@ async function _getConfiguredCustomProperties(groupId, region, options) {
604604
},
605605
agent: new https.Agent({ rejectUnauthorized: false })
606606
};
607-
propertiesConfig = await sendRequest(apiManagerConfig.url, options)
607+
const propertiesConfig = await sendRequest(apiManagerConfig.url, options)
608608
.then(response => {
609609
if(!response.body) {
610610
throw new Error(`Error getting custom properties from API-Manager: ${apiManagerConfig.ur}`);

apibuilder4elastic/custom_flow_nodes/api-builder-plugin-axway-api-management/src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ async function isAPIManagerUserAdmin(apiManagerConfig, logger) {
107107
},
108108
agent: new https.Agent({ rejectUnauthorized: false })
109109
};
110-
result = await sendRequest(config.url, options, data, 303)
110+
const result = await sendRequest(config.url, options, data, 303)
111111
.then(response => {
112112
return response;
113113
})

0 commit comments

Comments
 (0)