mirror of
https://github.com/sasjs/server.git
synced 2025-12-11 19:44:35 +00:00
fix(execution): removed empty webout from response
This commit is contained in:
@@ -78,7 +78,6 @@ export class ExecutionController {
|
|||||||
|
|
||||||
const logPath = path.join(session.path, 'log.log')
|
const logPath = path.join(session.path, 'log.log')
|
||||||
const printOutputPath = path.join(session.path, 'output.lst')
|
const printOutputPath = path.join(session.path, 'output.lst')
|
||||||
console.log(`🤖[printOutputPath]🤖`, printOutputPath)
|
|
||||||
const headersPath = path.join(session.path, 'stpsrv_header.txt')
|
const headersPath = path.join(session.path, 'stpsrv_header.txt')
|
||||||
|
|
||||||
const weboutPath = path.join(session.path, 'webout.txt')
|
const weboutPath = path.join(session.path, 'webout.txt')
|
||||||
@@ -107,7 +106,6 @@ export class ExecutionController {
|
|||||||
const printOutput = (await fileExists(printOutputPath))
|
const printOutput = (await fileExists(printOutputPath))
|
||||||
? await readFile(printOutputPath)
|
? await readFile(printOutputPath)
|
||||||
: ''
|
: ''
|
||||||
console.log(`🤖[printOutput]🤖`, printOutput)
|
|
||||||
const headersContent = (await fileExists(headersPath))
|
const headersContent = (await fileExists(headersPath))
|
||||||
? await readFile(headersPath)
|
? await readFile(headersPath)
|
||||||
: ''
|
: ''
|
||||||
@@ -128,15 +126,18 @@ export class ExecutionController {
|
|||||||
// it should be deleted by scheduleSessionDestroy
|
// it should be deleted by scheduleSessionDestroy
|
||||||
session.inUse = false
|
session.inUse = false
|
||||||
|
|
||||||
const resultParts = [webout, process.logsUUID, log]
|
const resultParts = []
|
||||||
|
|
||||||
|
if (webout) resultParts.push(webout)
|
||||||
|
|
||||||
|
resultParts.push(process.logsUUID)
|
||||||
|
resultParts.push(log)
|
||||||
|
|
||||||
if (printOutput) {
|
if (printOutput) {
|
||||||
resultParts.push(process.logsUUID)
|
resultParts.push(process.logsUUID)
|
||||||
resultParts.push(printOutput)
|
resultParts.push(printOutput)
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(`🤖[resultParts]🤖`, resultParts)
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
httpHeaders,
|
httpHeaders,
|
||||||
result:
|
result:
|
||||||
|
|||||||
Reference in New Issue
Block a user