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

feat(api): added autoexec + major type setting changes

This commit is contained in:
Saad Jutt
2022-05-24 21:12:32 +05:00
parent 1fed5ea6ac
commit 2a7223ad7d
26 changed files with 227 additions and 99 deletions

View File

@@ -26,6 +26,7 @@ import {
makeFilesNamesMap,
parseLogToArray
} from '../utils'
import { MulterFile } from '../types/Upload'
interface ExecuteReturnJsonPayload {
/**
@@ -167,7 +168,7 @@ const executeReturnRaw = async (
}
const executeReturnJson = async (
req: any,
req: express.Request,
_program: string
): Promise<ExecuteReturnJsonResponse> => {
const sasCodePath =
@@ -175,7 +176,9 @@ const executeReturnJson = async (
.join(getFilesFolder(), _program)
.replace(new RegExp('/', 'g'), path.sep) + '.sas'
const filesNamesMap = req.files?.length ? makeFilesNamesMap(req.files) : null
const filesNamesMap = req.files?.length
? makeFilesNamesMap(req.files as MulterFile[])
: null
try {
const { webout, log, httpHeaders } =