/**
 * Report routes
 */

const express = require('express');
const { requireAuth } = require('../middleware/auth.middleware');
const { daily, weekly, monthly } = require('../controllers/report.controller');

const router = express.Router();

router.use(requireAuth);

// Daily report for YYYY-MM-DD
router.get('/daily/:date', daily);

// Weekly report for week start date (YYYY-MM-DD)
router.get('/weekly/:weekStart', weekly);

// Monthly report
router.get('/monthly/:year/:month', monthly);

module.exports = router;

