import { Router } from 'express';
import * as leadController from '../controllers/leadController';
import { authenticate } from '../middleware/auth';

const router = Router();

// All lead routes require authentication
router.use(authenticate);

router.post('/', leadController.createLead);
router.get('/', leadController.getLeads);
router.get('/:id', leadController.getLead);
router.put('/:id', leadController.updateLead);

export default router;
