// src/routes/flights.js
const express = require('express');
const router = express.Router();
const { lowFareSearch, healthCheck } = require('../controllers/flightController');
const {
  lowFareSearchValidationRules,
  
} = require('../middleware/validateRequest');

// GET  /flights/health  — config & connectivity check
router.get('/health', healthCheck);

// POST /flights/low-fare-search  — main search endpoint
router.post(
  '/low-fare-search',
  lowFareSearchValidationRules,
  
  lowFareSearch
);

module.exports = router;
