import express from 'express';
import { authenticate } from '../middleware/authMiddleware.js';
import {
  createClubCalendarEvent,
  deleteClubCalendarEvent,
  listClubCalendarEvents,
  updateClubCalendarEvent,
} from '../controllers/calendarEventController.js';

const router = express.Router();
router.use(authenticate);

router.get('/:clubId', listClubCalendarEvents);
router.post('/:clubId', createClubCalendarEvent);
router.put('/:clubId/:eventId', updateClubCalendarEvent);
router.delete('/:clubId/:eventId', deleteClubCalendarEvent);

export default router;
