const express = require('express'); const router = express.Router(); const { createOrder, getMyOrders, getOrderById, getAllOrders, updateOrderStatus } = require('../controllers/orderController'); const { protect, authorize } = require('../middleware/authMiddleware'); router.post('/', protect, createOrder); router.get('/my-orders', protect, getMyOrders); router.get('/admin/all', protect, authorize('Admin'), getAllOrders); router.get('/:id', protect, getOrderById); router.put('/:id/status', protect, authorize('Admin'), updateOrderStatus); module.exports = router;