diff --git a/api/package.json b/api/package.json index 58ff057..a227cc2 100644 --- a/api/package.json +++ b/api/package.json @@ -17,7 +17,7 @@ }, "license": "MIT", "scripts": { - "lint": "prettier . --write" + "lint": "prettier . --write" }, "devDependencies": { "prettier": "2.2.1" diff --git a/api/src/api/v2.js b/api/src/api/v2.js index ceb06fd..d6b59a0 100644 --- a/api/src/api/v2.js +++ b/api/src/api/v2.js @@ -12,7 +12,7 @@ router.use((req, res, next) => { return next(); } - if (req.headers['content-type'] !== 'application/json') { + if (!req.headers['content-type'].startsWith('application/json')) { return res.status(415).send({ message: 'requests must be of type application/json', });