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

12 lines
No EOL
403 B
TypeScript

import express from 'express';
import { authenticateToken } from '../middlewares/checkAuth.test';
import { createProduct, listProducts, getProduct } from '../controllers/ProductController.test';
const productRouter = express.Router();
productRouter.post('/', authenticateToken, createProduct)
productRouter.get('/', listProducts);
productRouter.get('/:id', getProduct);
export default productRouter;