mirror of
https://github.com/sasjs/server.git
synced 2025-12-10 11:24:35 +00:00
fix: minor changes
This commit is contained in:
@@ -26,11 +26,9 @@ if (MODE?.trim() !== 'server' || CORS?.trim() === 'enable') {
|
||||
app.use(express.json({ limit: '50mb' }))
|
||||
app.use(morgan('tiny'))
|
||||
app.use(express.static(path.join(__dirname, '../public')))
|
||||
app.use(express.static(getWebBuildFolderPath()))
|
||||
|
||||
app.use('/', webRouter)
|
||||
app.use('/SASjsApi', apiRouter)
|
||||
app.use(express.json({ limit: '50mb' }))
|
||||
|
||||
app.use(express.static(getWebBuildFolderPath()))
|
||||
|
||||
export default connectDB().then(() => app)
|
||||
|
||||
@@ -39,9 +39,7 @@ const executeSASCode = async (req: any, { code }: ExecuteSASCodePayload) => {
|
||||
true
|
||||
)) as ExecuteReturnRaw
|
||||
|
||||
Object.entries(httpHeaders).forEach(([key, value]) => {
|
||||
req.res?.set(key, value)
|
||||
})
|
||||
req.res?.set(httpHeaders)
|
||||
|
||||
return result
|
||||
} catch (err: any) {
|
||||
|
||||
@@ -85,9 +85,7 @@ const executeReturnRaw = async (
|
||||
query
|
||||
)) as ExecuteReturnRaw
|
||||
|
||||
Object.entries(httpHeaders).forEach(([key, value]) => {
|
||||
req.res?.set(key, value)
|
||||
})
|
||||
req.res?.set(httpHeaders)
|
||||
|
||||
return result as string
|
||||
} catch (err: any) {
|
||||
@@ -121,9 +119,7 @@ const executeReturnJson = async (
|
||||
true
|
||||
)) as ExecuteReturnJson
|
||||
|
||||
Object.entries(httpHeaders).forEach(([key, value]) => {
|
||||
req.res?.set(key, value)
|
||||
})
|
||||
req.res?.set(httpHeaders)
|
||||
|
||||
return {
|
||||
status: 'success',
|
||||
|
||||
Reference in New Issue
Block a user