diff options
Diffstat (limited to 'src/api/middlewares/BodyParser.ts')
-rw-r--r-- | src/api/middlewares/BodyParser.ts | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/api/middlewares/BodyParser.ts b/src/api/middlewares/BodyParser.ts index ac8e0432..31d79a51 100644 --- a/src/api/middlewares/BodyParser.ts +++ b/src/api/middlewares/BodyParser.ts @@ -24,8 +24,7 @@ export function BodyParser(opts?: OptionsJson) { const jsonParser = bodyParser.json(opts); return (req: Request, res: Response, next: NextFunction) => { - if (!req.headers["content-type"]) - req.headers["content-type"] = "application/json"; + if (!req.headers["content-type"]) req.headers["content-type"] = "application/json"; jsonParser(req, res, (err) => { if (err) { |