import express from 'express';
import { createTransaction, getAllTransactions, getSingleTransaction, updateTransaction, deleteTransaction } from '../controllers/transactionController.js';
import { protect } from '../middleware/authMiddleware.js';

const router = express.Router();

router.post('/', protect, createTransaction);
router.get('/', protect, getAllTransactions);
router.get('/:id', protect, getSingleTransaction);
router.put('/:id', protect, updateTransaction);
router.delete('/:id', protect, deleteTransaction);

export default router;