diff --git a/lib/hooks/responses/index.js b/lib/hooks/responses/index.js index 66618aa26..c907a2fba 100644 --- a/lib/hooks/responses/index.js +++ b/lib/hooks/responses/index.js @@ -212,9 +212,9 @@ function _mixin_jsonx(req, res) { sails.log.debug('***********************************************************************************'); // Send conventional status message if no data was provided - // (see http://expressjs.com/en/api.html#res.sendStatus) + // (see http://expressjs.com/en/api.html#res.send) if (_.isUndefined(data)) { - return res.sendStatus(res.statusCode); + return res.status(res.statusCode).send(); } else if (typeof data !== 'object') { // (note that this guard includes arrays)