mirror of
https://github.com/sasjs/server.git
synced 2026-07-24 05:32:15 +00:00
fix(stp): return json for webout
This commit is contained in:
@@ -25,7 +25,7 @@ export class CodeController {
|
||||
public async executeSASCode(
|
||||
@Request() request: express.Request,
|
||||
@Body() body: ExecuteSASCodePayload
|
||||
): Promise<ExecuteReturnJsonResponse | Buffer> {
|
||||
): Promise<ExecuteReturnJsonResponse> {
|
||||
return executeSASCode(request, body)
|
||||
}
|
||||
}
|
||||
@@ -41,14 +41,9 @@ const executeSASCode = async (req: any, { code }: ExecuteSASCodePayload) => {
|
||||
true
|
||||
)) as ExecuteReturnJson
|
||||
|
||||
if (webout instanceof Buffer) {
|
||||
;(req as any).sasHeaders = httpHeaders
|
||||
return webout
|
||||
}
|
||||
|
||||
return {
|
||||
status: 'success',
|
||||
_webout: webout,
|
||||
_webout: webout as string,
|
||||
log: parseLogToArray(log),
|
||||
httpHeaders
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user