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

style: lint

This commit is contained in:
Mihajlo Medjedovic
2021-10-15 12:57:26 +00:00
parent 8bcb1c4b7b
commit 38ab27c1ed
6 changed files with 81 additions and 71 deletions

View File

@@ -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

View File

@@ -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