1
0
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:
Saad Jutt
2022-02-18 08:03:01 +05:00
parent da899b90e2
commit 0b5f958f45
3 changed files with 4 additions and 12 deletions

View File

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

View File

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

View File

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