mirror of
https://github.com/sasjs/server.git
synced 2026-01-18 11:20:05 +00:00
style: lint
This commit is contained in:
@@ -85,7 +85,11 @@ router.get('/SASjsExecutor/do', async (req, res) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
router.post('/SASjsExecutor/do', fileUploadController.preuploadMiddleware, fileUploadController.getMulterUploadObject().any(), async (req: any, res: any) => {
|
router.post(
|
||||||
|
'/SASjsExecutor/do',
|
||||||
|
fileUploadController.preuploadMiddleware,
|
||||||
|
fileUploadController.getMulterUploadObject().any(),
|
||||||
|
async (req: any, res: any) => {
|
||||||
if (isRequestQuery(req.query)) {
|
if (isRequestQuery(req.query)) {
|
||||||
let sasCodePath = path
|
let sasCodePath = path
|
||||||
.join(getTmpFilesFolderPath(), req.query._program)
|
.join(getTmpFilesFolderPath(), req.query._program)
|
||||||
@@ -101,7 +105,13 @@ router.post('/SASjsExecutor/do', fileUploadController.preuploadMiddleware, fileU
|
|||||||
}
|
}
|
||||||
|
|
||||||
await new ExecutionController()
|
await new ExecutionController()
|
||||||
.execute(sasCodePath, undefined, req.sasSession, { ...req.query }, { filesNamesMap: filesNamesMap })
|
.execute(
|
||||||
|
sasCodePath,
|
||||||
|
undefined,
|
||||||
|
req.sasSession,
|
||||||
|
{ ...req.query },
|
||||||
|
{ filesNamesMap: filesNamesMap }
|
||||||
|
)
|
||||||
.then((result: {}) => {
|
.then((result: {}) => {
|
||||||
res.status(200).send(result)
|
res.status(200).send(result)
|
||||||
})
|
})
|
||||||
@@ -118,6 +128,7 @@ router.post('/SASjsExecutor/do', fileUploadController.preuploadMiddleware, fileU
|
|||||||
message: `Please provide the location of SAS code`
|
message: `Please provide the location of SAS code`
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
|
)
|
||||||
|
|
||||||
export default router
|
export default router
|
||||||
|
|||||||
@@ -40,7 +40,6 @@ export const generateFileUploadSasCode = (
|
|||||||
count: number
|
count: number
|
||||||
}[] = []
|
}[] = []
|
||||||
|
|
||||||
|
|
||||||
fs.readdirSync(sasSessionFolder).forEach((fileName) => {
|
fs.readdirSync(sasSessionFolder).forEach((fileName) => {
|
||||||
let fileCountString = fileCount < 100 ? '0' + fileCount : fileCount
|
let fileCountString = fileCount < 100 ? '0' + fileCount : fileCount
|
||||||
fileCountString = fileCount < 10 ? '00' + fileCount : fileCount
|
fileCountString = fileCount < 10 ? '00' + fileCount : fileCount
|
||||||
|
|||||||
Reference in New Issue
Block a user