mirror of
https://github.com/sasjs/adapter.git
synced 2025-12-20 21:01:18 +00:00
Compare commits
3 Commits
v2.3.0
...
callback-v
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
591e1ebc09 | ||
|
|
bd19457c2a | ||
|
|
b0570e1cd9 |
@@ -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;
|
||||||
|
|||||||
46
src/SASjs.ts
46
src/SASjs.ts
@@ -550,31 +550,41 @@ export default class SASjs {
|
|||||||
...this.sasjsConfig,
|
...this.sasjsConfig,
|
||||||
...config
|
...config
|
||||||
}
|
}
|
||||||
|
if (
|
||||||
if (config.serverType === ServerType.SasViya && config.contextName) {
|
typeof loginRequiredCallback === 'function' ||
|
||||||
if (config.useComputeApi) {
|
typeof loginRequiredCallback === 'undefined'
|
||||||
return await this.computeJobExecutor!.execute(
|
) {
|
||||||
sasJob,
|
if (config.serverType === ServerType.SasViya && config.contextName) {
|
||||||
data,
|
if (config.useComputeApi) {
|
||||||
config,
|
return await this.computeJobExecutor!.execute(
|
||||||
loginRequiredCallback,
|
sasJob,
|
||||||
accessToken
|
data,
|
||||||
)
|
config,
|
||||||
|
loginRequiredCallback,
|
||||||
|
accessToken
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
return await this.jesJobExecutor!.execute(
|
||||||
|
sasJob,
|
||||||
|
data,
|
||||||
|
config,
|
||||||
|
loginRequiredCallback,
|
||||||
|
accessToken
|
||||||
|
)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
return await this.jesJobExecutor!.execute(
|
return await this.webJobExecutor!.execute(
|
||||||
sasJob,
|
sasJob,
|
||||||
data,
|
data,
|
||||||
config,
|
config,
|
||||||
loginRequiredCallback,
|
loginRequiredCallback
|
||||||
accessToken
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return await this.webJobExecutor!.execute(
|
return Promise.reject(
|
||||||
sasJob,
|
new ErrorResponse(
|
||||||
data,
|
`Invalid loginRequiredCallback parameter was provided. Expected Callback function but found ${typeof loginRequiredCallback}`
|
||||||
config,
|
)
|
||||||
loginRequiredCallback
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user