/**
 * Admin category routes
 */

const express = require('express');
const router = express.Router();
const adminCategoryController = require('../controllers/adminCategoryController');
const { authenticateAdmin } = require('../middleware/auth');

// All routes require admin authentication
router.use(authenticateAdmin);

// Category routes
router.get('/', adminCategoryController.getCategories);
router.get('/:id', adminCategoryController.getCategoryById);
router.post('/', adminCategoryController.createCategory);
router.put('/:id', adminCategoryController.updateCategory);
router.delete('/:id', adminCategoryController.deleteCategory);

module.exports = router;
