/**
 * Response helpers - Standard API response formats
 */

/**
 * Standard error response
 */
function errorResponse(res, statusCode, message, extras = {}) {
  return res.status(statusCode).json({ success: false, error: message, ...extras });
}

/**
 * Standard success response
 */
function ok(res, data = {}) {
  return res.json({ success: true, ...data });
}

module.exports = {
  errorResponse,
  ok,
};
