const express = require('express');
const router = express.Router();
const orderController = require('../controllers/orderController');

// Buyurtmalar uchun yo'nalishlar
router.post('/orders', orderController.placeOrder);      // Yaratish
router.get('/orders', orderController.listOrders);       // Ro'yxat
router.patch('/orders/:id/cancel', orderController.cancel); // Bekor qilish

module.exports = router;
