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

fix: update response of /SASjsApi/stp/execute and /SASjsApi/code/execute

This commit is contained in:
2022-08-19 15:06:39 +05:00
parent e94c56b23f
commit 98ea2ac9b9
7 changed files with 50 additions and 158 deletions

View File

@@ -70,6 +70,8 @@ type SASjsEditorProps = {
}
const baseUrl = window.location.origin
const SASJS_LOGS_SEPARATOR =
'SASJS_LOGS_SEPARATOR_163ee17b6ff24f028928972d80a26784'
const SASjsEditor = ({
selectedFilePath,
@@ -203,13 +205,8 @@ const SASjsEditor = ({
axios
.post(`/SASjsApi/code/execute`, { code, runTime: selectedRunTime })
.then((res: any) => {
const parsedLog = res?.data?.log
.map((logLine: any) => logLine.line)
.join('\n')
setLog(parsedLog)
setWebout(`${res.data?._webout}`)
setWebout(res.data.split(SASJS_LOGS_SEPARATOR)[0] ?? '')
setLog(res.data.split(SASJS_LOGS_SEPARATOR)[1] ?? '')
setTab('log')
// Scroll to bottom of log