You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

12 lines
225 B

function sendJSONResponse(req, res, next) {
// do nothing if no result data set
if (!res || !res.body) {
return next();
}
// respond
return res.status(200).json(res.body);
}
module.exports = sendJSONResponse;