1
0
mirror of https://github.com/sasjs/adapter.git synced 2025-12-11 09:24:35 +00:00

Compare commits

..

2 Commits

Author SHA1 Message Date
Allan Bowe
9c98cabe6c Merge pull request #649 from sasjs/sasjs-server-log-parsing
fix: adopted new log structure of SASJS server
2022-02-20 23:27:36 +02:00
Saad Jutt
a6f6897543 fix: adopted new log structure of SASJS server 2022-02-20 20:50:38 +05:00
2 changed files with 11 additions and 2 deletions

View File

@@ -52,9 +52,13 @@ export class SasJsJobExecutor extends BaseJobExecutor {
authConfig?.access_token
)
.then(async (res: any) => {
const parsedSasjsServerLog = res.result.log
.map((logLine: any) => logLine.line)
.join('\n')
const resObj = {
result: res.result._webout,
log: res.result.log
log: parsedSasjsServerLog
}
this.requestClient!.appendRequest(resObj, sasJob, config.debug)

View File

@@ -146,11 +146,16 @@ export class WebJobExecutor extends BaseJobExecutor {
const requestPromise = new Promise((resolve, reject) => {
this.requestClient!.post(apiUrl, formData, authConfig?.access_token)
.then(async (res: any) => {
const parsedSasjsServerLog =
this.serverType === ServerType.Sasjs
? res.result.log.map((logLine: any) => logLine.line).join('\n')
: res.result.log
const resObj =
this.serverType === ServerType.Sasjs
? {
result: res.result._webout,
log: res.result.log
log: parsedSasjsServerLog
}
: res
this.requestClient!.appendRequest(resObj, sasJob, config.debug)