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.
 
 
 

19 lines
281 B

function success(res, json) {
res.status(200);
res.json({
success: true,
response: json,
});
res.end();
}
function failure(res, e) {
res.status(400);
res.json({
success: false,
error: (e&&e.message) || e,
});
res.end();
}
export {success, failure}