1
0
mirror of https://github.com/sasjs/adapter.git synced 2025-12-21 13:11:20 +00:00

Compare commits

..

3 Commits

Author SHA1 Message Date
sabir_hassan
591e1ebc09 fix: callback type checking fixes #304 2021-05-27 21:59:40 +05:00
Allan Bowe
bd19457c2a Merge branch 'master' of github.com:sasjs/adapter 2021-05-26 11:23:13 +03:00
Allan Bowe
b0570e1cd9 chore: automated commit 2021-05-26 11:23:08 +03:00
2 changed files with 30 additions and 18 deletions

View File

@@ -55,6 +55,7 @@ filename mc url "https://raw.githubusercontent.com/sasjs/core/main/all.sas";
%inc mc; %inc mc;
filename ft15f001 temp; filename ft15f001 temp;
parmcards4; parmcards4;
%webout(FETCH)
%webout(OPEN) %webout(OPEN)
%macro x(); %macro x();
%do i=1 %to &_webin_file_count; %webout(OBJ,&&_webin_name&i) %end; %do i=1 %to &_webin_file_count; %webout(OBJ,&&_webin_name&i) %end;
@@ -63,6 +64,7 @@ parmcards4;
;;;; ;;;;
%mm_createwebservice(path=/Public/app/common,name=sendObj) %mm_createwebservice(path=/Public/app/common,name=sendObj)
parmcards4; parmcards4;
%webout(FETCH)
%webout(OPEN) %webout(OPEN)
%macro x(); %macro x();
%do i=1 %to &_webin_file_count; %webout(ARR,&&_webin_name&i) %end; %do i=1 %to &_webin_file_count; %webout(ARR,&&_webin_name&i) %end;

View File

@@ -550,7 +550,10 @@ export default class SASjs {
...this.sasjsConfig, ...this.sasjsConfig,
...config ...config
} }
if (
typeof loginRequiredCallback === 'function' ||
typeof loginRequiredCallback === 'undefined'
) {
if (config.serverType === ServerType.SasViya && config.contextName) { if (config.serverType === ServerType.SasViya && config.contextName) {
if (config.useComputeApi) { if (config.useComputeApi) {
return await this.computeJobExecutor!.execute( return await this.computeJobExecutor!.execute(
@@ -577,6 +580,13 @@ export default class SASjs {
loginRequiredCallback loginRequiredCallback
) )
} }
} else {
return Promise.reject(
new ErrorResponse(
`Invalid loginRequiredCallback parameter was provided. Expected Callback function but found ${typeof loginRequiredCallback}`
)
)
}
} }
/** /**