1
0
mirror of https://github.com/sasjs/server.git synced 2025-12-10 19:34:34 +00:00

chore: removed deprecated body-parser

This commit is contained in:
Saad Jutt
2022-09-19 17:47:29 +05:00
parent 06d3b17154
commit e65cba9af0

View File

@@ -3,7 +3,6 @@ import express, { ErrorRequestHandler } from 'express'
import csrf, { CookieOptions } from 'csurf'
import cookieParser from 'cookie-parser'
import dotenv from 'dotenv'
import bodyParser from 'body-parser'
import {
copySASjsCore,
@@ -80,12 +79,7 @@ export default setProcessVariables().then(async () => {
// Body parser is used for decoding the formdata on POST request.
// Currently only place we use it is SAS9 Mock - POST /SASLogon/login
app.use(
bodyParser.urlencoded({
extended: true
})
)
app.use(bodyParser.json())
app.use(express.urlencoded({ extended: true }))
await setupFolders()
await copySASjsCore()