1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-01-08 13:00:05 +00:00

fix: file upload on SASJS SERVER

Also fixed appendRequest when debug on while on SASJS SERVER
This commit is contained in:
2022-03-25 18:05:47 +01:00
parent 256e4ef314
commit 1d1ef7179e
4 changed files with 36 additions and 8 deletions

View File

@@ -131,6 +131,24 @@ export class RequestClient implements HttpClient {
} else {
sasWork = response.log
}
} else if (response?.result?.log) {
//In this scenario we know we got the response from SASJS server
//Log is array of `{ line: '' }` so we need to convert it back to text
//To be able to parse it with current functions.
let log: string = ''
if (typeof log !== 'string') {
log = response.result.log.map((logLine: any) => logLine.line).join('\n')
}
sourceCode = parseSourceCode(log)
generatedCode = parseGeneratedCode(log)
if (response?.result?._webout) {
sasWork = response.result._webout.WORK
} else {
sasWork = log
}
} else if (response?.result) {
sourceCode = parseSourceCode(response.result)
generatedCode = parseGeneratedCode(response.result)