module.exports = function sendJSON(res, next) {
  return _sendJSON(error, data) {
    if (error) {
      return next(error);
    }
    return res.json(data);
  }
};
module.exports = function sendJSON(res, next) {
  return function _sendJSON(error, data) {
    if (error) {
      return next(error);
    }
    return res.json(data);
  }
};
Fix syntax error - missing function declaration
Fix syntax error - missing function declaration
