mirror of
https://github.com/sasjs/server.git
synced 2026-01-17 10:50:05 +00:00
fix: prettier
This commit is contained in:
@@ -93,7 +93,7 @@ ${program}`
|
|||||||
(key: string) => key.toLowerCase() === '_debug'
|
(key: string) => key.toLowerCase() === '_debug'
|
||||||
)
|
)
|
||||||
|
|
||||||
if (debug && vars[debug] >= 131 || stderr) {
|
if ((debug && vars[debug] >= 131) || stderr) {
|
||||||
webout = `<html><body>
|
webout = `<html><body>
|
||||||
${webout}
|
${webout}
|
||||||
<div style="text-align:left">
|
<div style="text-align:left">
|
||||||
|
|||||||
@@ -1,8 +1,16 @@
|
|||||||
import express from 'express'
|
import express from 'express'
|
||||||
import { createFileTree, getSessionController, getTreeExample } from '../controllers'
|
import {
|
||||||
|
createFileTree,
|
||||||
|
getSessionController,
|
||||||
|
getTreeExample
|
||||||
|
} from '../controllers'
|
||||||
import { ExecutionResult, isRequestQuery, isFileTree } from '../types'
|
import { ExecutionResult, isRequestQuery, isFileTree } from '../types'
|
||||||
import path from 'path'
|
import path from 'path'
|
||||||
import { getTmpFilesFolderPath, getTmpFolderPath, makeFilesNamesMap } from '../utils'
|
import {
|
||||||
|
getTmpFilesFolderPath,
|
||||||
|
getTmpFolderPath,
|
||||||
|
makeFilesNamesMap
|
||||||
|
} from '../utils'
|
||||||
import { ExecutionController } from '../controllers'
|
import { ExecutionController } from '../controllers'
|
||||||
import { uuidv4 } from '@sasjs/utils'
|
import { uuidv4 } from '@sasjs/utils'
|
||||||
|
|
||||||
@@ -102,7 +110,11 @@ router.get('/SASjsExecutor/do', async (req, res) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
router.post('/SASjsExecutor/do', preuploadMiddleware, upload.any(), async (req: any, res: any) => {
|
router.post(
|
||||||
|
'/SASjsExecutor/do',
|
||||||
|
preuploadMiddleware,
|
||||||
|
upload.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)
|
||||||
@@ -118,7 +130,13 @@ router.post('/SASjsExecutor/do', preuploadMiddleware, upload.any(), async (req:
|
|||||||
}
|
}
|
||||||
|
|
||||||
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)
|
||||||
})
|
})
|
||||||
@@ -135,6 +153,7 @@ router.post('/SASjsExecutor/do', preuploadMiddleware, upload.any(), async (req:
|
|||||||
message: `Please provide the location of SAS code`
|
message: `Please provide the location of SAS code`
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
|
)
|
||||||
|
|
||||||
export default router
|
export default router
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ export const makeFilesNamesMap = (files: any) => {
|
|||||||
* @param sasUploadFolder name of the folder that is created for the purpose of files in concurrent request
|
* @param sasUploadFolder name of the folder that is created for the purpose of files in concurrent request
|
||||||
* @returns generated sas code
|
* @returns generated sas code
|
||||||
*/
|
*/
|
||||||
export const generateFileUploadSasCode = (
|
export const generateFileUploadSasCode = (
|
||||||
filesNamesMap: any,
|
filesNamesMap: any,
|
||||||
sasSessionFolder: string
|
sasSessionFolder: string
|
||||||
): string => {
|
): string => {
|
||||||
|
|||||||
Reference in New Issue
Block a user