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