mirror of
https://github.com/sasjs/server.git
synced 2026-01-19 11:50:05 +00:00
fix: prettier
This commit is contained in:
@@ -93,7 +93,7 @@ ${program}`
|
||||
(key: string) => key.toLowerCase() === '_debug'
|
||||
)
|
||||
|
||||
if (debug && vars[debug] >= 131 || stderr) {
|
||||
if ((debug && vars[debug] >= 131) || stderr) {
|
||||
webout = `<html><body>
|
||||
${webout}
|
||||
<div style="text-align:left">
|
||||
|
||||
@@ -1,8 +1,16 @@
|
||||
import express from 'express'
|
||||
import { createFileTree, getSessionController, getTreeExample } from '../controllers'
|
||||
import {
|
||||
createFileTree,
|
||||
getSessionController,
|
||||
getTreeExample
|
||||
} from '../controllers'
|
||||
import { ExecutionResult, isRequestQuery, isFileTree } from '../types'
|
||||
import path from 'path'
|
||||
import { getTmpFilesFolderPath, getTmpFolderPath, makeFilesNamesMap } from '../utils'
|
||||
import {
|
||||
getTmpFilesFolderPath,
|
||||
getTmpFolderPath,
|
||||
makeFilesNamesMap
|
||||
} from '../utils'
|
||||
import { ExecutionController } from '../controllers'
|
||||
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)) {
|
||||
let sasCodePath = path
|
||||
.join(getTmpFilesFolderPath(), req.query._program)
|
||||
@@ -118,7 +130,13 @@ router.post('/SASjsExecutor/do', preuploadMiddleware, upload.any(), async (req:
|
||||
}
|
||||
|
||||
await new ExecutionController()
|
||||
.execute(sasCodePath, undefined, req.sasSession, { ...req.query }, { filesNamesMap: filesNamesMap })
|
||||
.execute(
|
||||
sasCodePath,
|
||||
undefined,
|
||||
req.sasSession,
|
||||
{ ...req.query },
|
||||
{ filesNamesMap: filesNamesMap }
|
||||
)
|
||||
.then((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`
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
)
|
||||
|
||||
export default router
|
||||
|
||||
Reference in New Issue
Block a user