mirror of
https://github.com/sasjs/server.git
synced 2026-01-15 18:00:05 +00:00
fix: update SASjsApi/stp/execute post api endpoints to capture url params
This commit is contained in:
@@ -40,10 +40,18 @@ stpRouter.post(
|
|||||||
fileUploadController.preuploadMiddleware,
|
fileUploadController.preuploadMiddleware,
|
||||||
fileUploadController.getMulterUploadObject().any(),
|
fileUploadController.getMulterUploadObject().any(),
|
||||||
async (req: any, res: any) => {
|
async (req: any, res: any) => {
|
||||||
if (isExecutionQuery(req.body)) {
|
|
||||||
|
let _program
|
||||||
|
if (isExecutionQuery(req.query)) {
|
||||||
|
_program = req.query._program
|
||||||
|
} else if (isExecutionQuery(req.body)) {
|
||||||
|
_program = req.body._program
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_program) {
|
||||||
let sasCodePath =
|
let sasCodePath =
|
||||||
path
|
path
|
||||||
.join(getTmpFilesFolderPath(), req.body._program)
|
.join(getTmpFilesFolderPath(), _program)
|
||||||
.replace(new RegExp('/', 'g'), path.sep) + '.sas'
|
.replace(new RegExp('/', 'g'), path.sep) + '.sas'
|
||||||
|
|
||||||
let filesNamesMap = null
|
let filesNamesMap = null
|
||||||
|
|||||||
Reference in New Issue
Block a user