mirror of
https://github.com/sasjs/server.git
synced 2026-01-18 19:30:06 +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(express.json({ limit: '50mb' }))
|
||||||
app.use(morgan('tiny'))
|
app.use(morgan('tiny'))
|
||||||
app.use(express.static(path.join(__dirname, '../public')))
|
app.use(express.static(path.join(__dirname, '../public')))
|
||||||
|
app.use(express.static(getWebBuildFolderPath()))
|
||||||
|
|
||||||
app.use('/', webRouter)
|
app.use('/', webRouter)
|
||||||
app.use('/SASjsApi', apiRouter)
|
app.use('/SASjsApi', apiRouter)
|
||||||
app.use(express.json({ limit: '50mb' }))
|
|
||||||
|
|
||||||
app.use(express.static(getWebBuildFolderPath()))
|
|
||||||
|
|
||||||
export default connectDB().then(() => app)
|
export default connectDB().then(() => app)
|
||||||
|
|||||||
@@ -39,9 +39,7 @@ const executeSASCode = async (req: any, { code }: ExecuteSASCodePayload) => {
|
|||||||
true
|
true
|
||||||
)) as ExecuteReturnRaw
|
)) as ExecuteReturnRaw
|
||||||
|
|
||||||
Object.entries(httpHeaders).forEach(([key, value]) => {
|
req.res?.set(httpHeaders)
|
||||||
req.res?.set(key, value)
|
|
||||||
})
|
|
||||||
|
|
||||||
return result
|
return result
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
|
|||||||
@@ -85,9 +85,7 @@ const executeReturnRaw = async (
|
|||||||
query
|
query
|
||||||
)) as ExecuteReturnRaw
|
)) as ExecuteReturnRaw
|
||||||
|
|
||||||
Object.entries(httpHeaders).forEach(([key, value]) => {
|
req.res?.set(httpHeaders)
|
||||||
req.res?.set(key, value)
|
|
||||||
})
|
|
||||||
|
|
||||||
return result as string
|
return result as string
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
@@ -121,9 +119,7 @@ const executeReturnJson = async (
|
|||||||
true
|
true
|
||||||
)) as ExecuteReturnJson
|
)) as ExecuteReturnJson
|
||||||
|
|
||||||
Object.entries(httpHeaders).forEach(([key, value]) => {
|
req.res?.set(httpHeaders)
|
||||||
req.res?.set(key, value)
|
|
||||||
})
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
status: 'success',
|
status: 'success',
|
||||||
|
|||||||
Reference in New Issue
Block a user