mirror of
https://github.com/sasjs/adapter.git
synced 2025-12-11 01:14:36 +00:00
Merge pull request #649 from sasjs/sasjs-server-log-parsing
fix: adopted new log structure of SASJS server
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user