Skip to content

Commit f01e341

Browse files
committed
APICall hotfix
1 parent 05f1c90 commit f01e341

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@smythos/sre",
3-
"version": "1.5.54",
3+
"version": "1.5.55",
44
"description": "Smyth Runtime Environment",
55
"author": "Alaa-eddine KADDOURI",
66
"license": "MIT",

packages/core/src/Components/APICall/APICall.class.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export class APICall extends Component {
6565
super();
6666
}
6767

68-
init() { }
68+
init() {}
6969

7070
async process(input, config, agent: Agent) {
7171
await super.process(input, config, agent);
@@ -115,7 +115,11 @@ export class APICall extends Component {
115115
let _error: any = undefined;
116116
try {
117117
// To support both old and new OAuth configuration, we check for both oauth_con_id and oauthService.
118-
if ((config?.data?.oauth_con_id !== undefined && config?.data?.oauth_con_id !== '' && config?.data?.oauth_con_id !== 'None') || (config?.data?.oauthService !== '' && config.data.oauthService !== 'None')) {
118+
logger.debug('checking oauth config', config?.data?.oauth_con_id, config?.data?.oauthService);
119+
if (
120+
(config?.data?.oauth_con_id !== undefined && config?.data?.oauth_con_id !== '' && config?.data?.oauth_con_id !== 'None') ||
121+
(config?.data?.oauthService !== '' && config.data.oauthService !== 'None')
122+
) {
119123
const additionalParams = extractAdditionalParamsForOAuth1(reqConfig);
120124
const oauthHeaders = await generateOAuthHeaders(agent, config, reqConfig, logger, additionalParams);
121125
//reqConfig.headers = { ...reqConfig.headers, ...oauthHeaders };

packages/sdk/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@smythos/sdk",
3-
"version": "1.0.48",
3+
"version": "1.0.49",
44
"description": "SRE SDK",
55
"keywords": [
66
"smythos",

0 commit comments

Comments
 (0)