- Initial commit... A DB, some routes, and basic authentication routines...
This commit is contained in:
11
lib/validateType.js
Normal file
11
lib/validateType.js
Normal file
@@ -0,0 +1,11 @@
|
||||
const validateJsonData = (req, res, next) => {
|
||||
if (!req.is('application/json')) {
|
||||
return next(
|
||||
new errors.InvalidContentError("Expects 'application/json'"),
|
||||
);
|
||||
}
|
||||
|
||||
next();
|
||||
};
|
||||
|
||||
module.exports = validateJsonData;
|
||||
Reference in New Issue
Block a user