summary refs log tree commit diff
path: root/src/api/middlewares/BodyParser.ts
diff options
context:
space:
mode:
authorEmma [it/its]@Rory& <root@rory.gay>2023-12-11 01:12:54 +0100
committerEmma [it/its]@Rory& <root@rory.gay>2023-12-11 01:12:54 +0100
commit0a8ceb9e6349284e75545a01ffad608b020f78e2 (patch)
tree17a9163f963eddabf9168b0b630096b2f7535b64 /src/api/middlewares/BodyParser.ts
parentPrettier: use editorconfig (diff)
downloadserver-0a8ceb9e6349284e75545a01ffad608b020f78e2.tar.xz
Actually run prettier dev/emma-refactors
Diffstat (limited to 'src/api/middlewares/BodyParser.ts')
-rw-r--r--src/api/middlewares/BodyParser.ts3
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) {