mirror of
https://github.com/sasjs/adapter.git
synced 2026-01-06 20:10:05 +00:00
fix: when contextName is falsy value, do not add it to apiUrl in web approach and fallback to default in jes approach
This commit is contained in:
@@ -619,6 +619,11 @@ export default class SASjs {
|
|||||||
authConfig
|
authConfig
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
|
if (!config.contextName)
|
||||||
|
config = {
|
||||||
|
...config,
|
||||||
|
contextName: 'SAS Job Execution compute context'
|
||||||
|
}
|
||||||
return await this.jesJobExecutor!.execute(
|
return await this.jesJobExecutor!.execute(
|
||||||
sasJob,
|
sasJob,
|
||||||
data,
|
data,
|
||||||
|
|||||||
@@ -54,7 +54,12 @@ export class WebJobExecutor extends BaseJobExecutor {
|
|||||||
|
|
||||||
apiUrl += jobUri.length > 0 ? '&_job=' + jobUri : ''
|
apiUrl += jobUri.length > 0 ? '&_job=' + jobUri : ''
|
||||||
|
|
||||||
apiUrl += config.contextName ? `&_contextname=${config.contextName}` : ''
|
// if context name exists and is not blank string
|
||||||
|
// then add _contextname variable in apiUrl
|
||||||
|
apiUrl +=
|
||||||
|
config.contextName && !/\s/.test(config.contextName)
|
||||||
|
? `&_contextname=${config.contextName}`
|
||||||
|
: ''
|
||||||
}
|
}
|
||||||
|
|
||||||
let requestParams = {
|
let requestParams = {
|
||||||
|
|||||||
Reference in New Issue
Block a user