From 2b2e6682db5670a259f43d0894d7b9052c786121 Mon Sep 17 00:00:00 2001 From: Kfir Dayan Date: Fri, 9 Jun 2023 19:15:53 +0300 Subject: [PATCH] list of products --- src/controllers/ProductController.ts | 3 --- src/routes/product.ts | 2 -- 2 files changed, 5 deletions(-) diff --git a/src/controllers/ProductController.ts b/src/controllers/ProductController.ts index b13550a..c194e5c 100644 --- a/src/controllers/ProductController.ts +++ b/src/controllers/ProductController.ts @@ -18,9 +18,6 @@ export async function createProduct(req: Request, res: Response) { } } -// List products: This should allow any user to view a paginated list of -// products, sorted by price. - export async function listProducts(req: Request, res: Response) { try { const { page, limit } = req.query; diff --git a/src/routes/product.ts b/src/routes/product.ts index bc13f7b..8112159 100644 --- a/src/routes/product.ts +++ b/src/routes/product.ts @@ -6,8 +6,6 @@ import { createProduct, listProducts } from '../controllers/ProductController'; const productRouter = express.Router(); -// Create a product: This should require an authenticated user to provide a -// product name, description, and price. productRouter.post('/', authenticateToken, createProduct) productRouter.get('/', listProducts);