ecomm/__tests__/routes/cart.test.ts
2023-06-13 16:10:17 +03:00

14 lines
No EOL
412 B
TypeScript

import express from 'express';
import { authenticateToken } from '../middlewares/checkAuth.test';
import { addToCart, listCart, checkout } from '../controllers/CartController.test';
const cartRouter = express.Router();
cartRouter.post('/', authenticateToken, addToCart);
cartRouter.get('/', authenticateToken, listCart);
cartRouter.post('/checkout', authenticateToken, checkout);
export default cartRouter;