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

docs: left a comment regarding payload parts

This commit is contained in:
Yury Shkoda
2023-05-02 12:10:17 +03:00
parent 9f521634d9
commit bd1b58086d
2 changed files with 9 additions and 1 deletions

View File

@@ -28,7 +28,14 @@ interface ExecuteCodePayload {
export class CodeController { export class CodeController {
/** /**
* Execute Code on the Specified Runtime * Execute Code on the Specified Runtime
* @summary Run Code and Return Webout Content and Log * @summary Run Code and Return Webout Content, Log and Print output
* The order of returned parts of the payload is:
* 1. Webout (if present)
* 2. Logs UUID (used as separator)
* 3. Log
* 4. Logs UUID (used as separator)
* 5. Print (if present)
* Please see @sasjs/server/api/src/controllers/internal/Execution.ts for more information
*/ */
@Post('/execute') @Post('/execute')
public async executeCode( public async executeCode(

View File

@@ -170,6 +170,7 @@ const useEditor = ({
runTime: selectedRunTime runTime: selectedRunTime
}) })
.then((res: { data: string }) => { .then((res: { data: string }) => {
// INFO: the order of payload parts is set in @sasjs/server/api/src/controllers/internal/Execution.ts
const resDataSplitted = res.data.split(SASJS_LOGS_SEPARATOR) const resDataSplitted = res.data.split(SASJS_LOGS_SEPARATOR)
const webout = resDataSplitted[0] const webout = resDataSplitted[0]
const log = resDataSplitted[1] const log = resDataSplitted[1]