mirror of
https://github.com/sasjs/adapter.git
synced 2025-12-11 01:14:36 +00:00
Merge branch 'master' into sasjs-job
This commit is contained in:
@@ -155,24 +155,25 @@ export class SASViyaApiClient {
|
||||
null,
|
||||
true,
|
||||
true
|
||||
).catch(() => null)
|
||||
).catch((err) => err)
|
||||
})
|
||||
|
||||
const results = await Promise.all(promises)
|
||||
|
||||
results.forEach((result: any, index: number) => {
|
||||
if (result) {
|
||||
if (result && result.body && result.body.details) {
|
||||
try {
|
||||
const resultParsed = JSON.parse(result.body.details)
|
||||
|
||||
if (resultParsed && resultParsed.body) {
|
||||
let sysUserId = ''
|
||||
|
||||
if (result.log) {
|
||||
const sysUserIdLog = result.log
|
||||
const sysUserIdLog = resultParsed.body
|
||||
.split('\n')
|
||||
.find((line: string) => line.startsWith('SYSUSERID='))
|
||||
|
||||
if (sysUserIdLog) {
|
||||
sysUserId = sysUserIdLog.replace('SYSUSERID=', '')
|
||||
}
|
||||
}
|
||||
|
||||
executableContexts.push({
|
||||
createdBy: contextsList[index].createdBy,
|
||||
@@ -184,6 +185,11 @@ export class SASViyaApiClient {
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
throw error
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
return executableContexts
|
||||
|
||||
Reference in New Issue
Block a user