better style
This commit is contained in:
@@ -189,7 +189,7 @@ function ifUnauthenticated(authenticated, description) {
|
||||
}
|
||||
|
||||
function ifInvalidContentType(req, description) {
|
||||
if ( ! req.headers['content-type'] || req.headers['content-type'].split(';')[0] != 'application/json' ) {
|
||||
if (!req.is('application/json')) {
|
||||
throw new Error(description);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user