import express from 'express';
import { authenticate } from '../middleware/authMiddleware.js';
import {
    getDatesForClub,
    createDateForClub,
    updateTrainingTimes,
    addDiaryNote,
    deleteDiaryNote,
    addDiaryTag,
    addTagToDiaryDate,
    deleteTagFromDiaryDate
} from '../controllers/diaryController.js';

const router = express.Router();

router.post('/note', authenticate, addDiaryNote);
router.delete('/note/:noteId', authenticate, deleteDiaryNote);
router.post('/tag', authenticate, addDiaryTag);
router.post('/tag/:clubId/add-tag', authenticate, addTagToDiaryDate);
router.delete('/:clubId/tag', authenticate, deleteTagFromDiaryDate);
router.get('/:clubId', authenticate, getDatesForClub);
router.post('/:clubId', authenticate, createDateForClub);
router.put('/:clubId', authenticate, updateTrainingTimes);

export default router;
