function success(res, data = {}, message = '') {
  return res.json({success: true, message, data});
}

function failure(res, statusCode, message = 'Something went wrong', data = {}) {
  return res.status(statusCode).json({success: false, message, data});
}

module.exports = {success, failure};
