ecomm/__tests__/routes/cart.test.ts

14 lines
412 B
TypeScript
Raw Normal View History

2023-06-13 13:10:17 +00:00
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;