1
0
mirror of https://github.com/sasjs/server.git synced 2026-01-10 16:00:05 +00:00

fix(stp): return json for webout

This commit is contained in:
Saad Jutt
2022-02-21 04:13:04 +05:00
parent 232a73fd17
commit 5005f203b8
5 changed files with 34 additions and 25 deletions

View File

@@ -148,7 +148,8 @@ ${program}`
? await readFile(headersPath)
: ''
const httpHeaders: HTTPHeaders = extractHeaders(headersContent)
const fileResponse: boolean = httpHeaders.hasOwnProperty('content-type')
const fileResponse: boolean =
httpHeaders.hasOwnProperty('content-type') && !returnJson
const webout = (await fileExists(weboutPath))
? fileResponse