mirror of
https://github.com/sasjs/server.git
synced 2026-01-14 09:20:06 +00:00
fix: sending _webout as result object in response JSON
This commit is contained in:
2
api/package-lock.json
generated
2
api/package-lock.json
generated
@@ -16174,7 +16174,7 @@
|
|||||||
"integrity": "sha512-5kCf4TdCVOYve4wSHVTi+db34hknDwvY2C/JVEPHT6T3CkQ5cnwRVPSFz/1WzXzcVvdUi4ag5xd9SDOsU12oWA=="
|
"integrity": "sha512-5kCf4TdCVOYve4wSHVTi+db34hknDwvY2C/JVEPHT6T3CkQ5cnwRVPSFz/1WzXzcVvdUi4ag5xd9SDOsU12oWA=="
|
||||||
},
|
},
|
||||||
"@sasjs/utils": {
|
"@sasjs/utils": {
|
||||||
"version": "file:../../utils/build/sasjs-utils-5.0.0.tgz",
|
"version": "file:..\\..\\utils\\build\\sasjs-utils-5.0.0.tgz",
|
||||||
"integrity": "sha512-ZSX1oHLEl3Gaz1ILnmbf1hMt3WLfvAddck65BY1NduOePtHx2ioja9CjzXKxB75CphBjLdjR95tbmb8jjzGDZA==",
|
"integrity": "sha512-ZSX1oHLEl3Gaz1ILnmbf1hMt3WLfvAddck65BY1NduOePtHx2ioja9CjzXKxB75CphBjLdjR95tbmb8jjzGDZA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/fs-extra": "^9.0.11",
|
"@types/fs-extra": "^9.0.11",
|
||||||
|
|||||||
@@ -364,7 +364,7 @@ components:
|
|||||||
type: string
|
type: string
|
||||||
log:
|
log:
|
||||||
type: string
|
type: string
|
||||||
result:
|
_webout:
|
||||||
type: string
|
type: string
|
||||||
message:
|
message:
|
||||||
type: string
|
type: string
|
||||||
@@ -981,7 +981,7 @@ paths:
|
|||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
description: "Trigger a SAS program using it's location in the _program parameter.\nEnable debugging using the _debug parameter.\nAdditional URL parameters are turned into SAS macro variables.\nAny files provided are placed into the session and\ncorresponding _WEBIN_XXX variables are created."
|
description: "Trigger a SAS program using it's location in the _program parameter.\r\nEnable debugging using the _debug parameter.\r\nAdditional URL parameters are turned into SAS macro variables.\r\nAny files provided are placed into the session and\r\ncorresponding _WEBIN_XXX variables are created."
|
||||||
summary: 'Execute Stored Program, return raw content'
|
summary: 'Execute Stored Program, return raw content'
|
||||||
tags:
|
tags:
|
||||||
- STP
|
- STP
|
||||||
@@ -1005,7 +1005,7 @@ paths:
|
|||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/ExecuteReturnJsonResponse'
|
$ref: '#/components/schemas/ExecuteReturnJsonResponse'
|
||||||
description: "Trigger a SAS program using it's location in the _program parameter.\nEnable debugging using the _debug parameter.\nAdditional URL parameters are turned into SAS macro variables.\nAny files provided are placed into the session and\ncorresponding _WEBIN_XXX variables are created."
|
description: "Trigger a SAS program using it's location in the _program parameter.\r\nEnable debugging using the _debug parameter.\r\nAdditional URL parameters are turned into SAS macro variables.\r\nAny files provided are placed into the session and\r\ncorresponding _WEBIN_XXX variables are created."
|
||||||
summary: 'Execute Stored Program, return JSON'
|
summary: 'Execute Stored Program, return JSON'
|
||||||
tags:
|
tags:
|
||||||
- STP
|
- STP
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ export class ExecutionController {
|
|||||||
program = `
|
program = `
|
||||||
/* runtime vars */
|
/* runtime vars */
|
||||||
${varStatments}
|
${varStatments}
|
||||||
filename _webout "${weboutPath}";
|
filename _webout "${weboutPath}" mod;
|
||||||
|
|
||||||
/* dynamic user-provided vars */
|
/* dynamic user-provided vars */
|
||||||
${preProgramVarStatments}
|
${preProgramVarStatments}
|
||||||
@@ -111,7 +111,7 @@ ${program}`
|
|||||||
|
|
||||||
if (returnJson) {
|
if (returnJson) {
|
||||||
const response: any = {
|
const response: any = {
|
||||||
result: webout
|
webout: webout
|
||||||
}
|
}
|
||||||
if ((debugValue && debugValue >= 131) || session.crashed) {
|
if ((debugValue && debugValue >= 131) || session.crashed) {
|
||||||
response.log = log
|
response.log = log
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ interface ExecuteReturnJsonPayload {
|
|||||||
interface ExecuteReturnJsonResponse {
|
interface ExecuteReturnJsonResponse {
|
||||||
status: string
|
status: string
|
||||||
log?: string
|
log?: string
|
||||||
result?: string
|
_webout?: string
|
||||||
message?: string
|
message?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -120,7 +120,7 @@ const executeReturnJson = async (
|
|||||||
)
|
)
|
||||||
return {
|
return {
|
||||||
status: 'success',
|
status: 'success',
|
||||||
result: jsonResult.result,
|
_webout: jsonResult.webout,
|
||||||
log: jsonResult.log
|
log: jsonResult.log
|
||||||
}
|
}
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
|
|||||||
Reference in New Issue
Block a user