const { Router } = require('express'); const { list, getById, create, update, remove, search, sendInvitation, candidature, nextEventGuestCount } = require('../controllers/guestController'); const { authenticate } = require('../middleware/auth'); const router = Router(); router.get('/', authenticate, list); router.get('/search', authenticate, search); router.get('/:id', authenticate, getById); router.post('/', authenticate, create); router.put('/:id', authenticate, update); router.delete('/:id', authenticate, remove); router.post('/:id/send-invitation', authenticate, sendInvitation); router.post('/:id/candidature', authenticate, candidature); router.get('/next-count', authenticate, nextEventGuestCount); module.exports = router;