const express = require('express');
const router = express.Router();
const TimewishController = require('../controllers/TimewishController');
const unhashRequestIds = require('../middleware/unhashRequest');

/**
 * Routen für Zeitwünsche
 */

// GET /api/timewish - Alle Zeitwünsche abrufen
router.get('/', TimewishController.getAllTimewishes.bind(TimewishController));

// POST /api/timewish - Neuen Zeitwunsch erstellen
router.post('/', unhashRequestIds, TimewishController.createTimewish.bind(TimewishController));

// DELETE /api/timewish/:id - Zeitwunsch löschen
router.delete('/:id', unhashRequestIds, TimewishController.deleteTimewish.bind(TimewishController));

module.exports = router;

