const express = require('express');
const router = express.Router();
const { getAllEvents, createEvent, updateEvent, deleteEvent, filterEvents } = require('../controllers/eventController.js');
const authMiddleware = require('../middleware/authMiddleware')

router.get('/', authMiddleware, getAllEvents);
router.post('/', authMiddleware, createEvent);
router.put('/:id', authMiddleware, updateEvent);
router.delete('/:id', authMiddleware, deleteEvent);
router.post('/filter', filterEvents);

module.exports = router;
