better style

This commit is contained in:
Raul Ochoa 2015-07-10 01:31:06 +02:00
parent 579cabdc1a
commit 6e0678e084

View File

@ -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);
}
}