import { Router } from 'express';
import {
  getAuthors,
  getCatalogSummary,
  getCatalogues,
  getCategories,
  getPublishers,
} from '../controllers/catalog.controller';
import { cacheMiddleware } from '../middleware/cache.middleware';

const router = Router();

router.get('/summary', cacheMiddleware(60), getCatalogSummary);
router.get('/categories', cacheMiddleware(300), getCategories);
router.get('/authors', cacheMiddleware(300), getAuthors);
router.get('/publishers', cacheMiddleware(300), getPublishers);
router.get('/catalogues', cacheMiddleware(300), getCatalogues);

export default router;
