From b35089ce6e8ea9cf448684775b8f98ca39d2b433 Mon Sep 17 00:00:00 2001 From: Uzo-Felix Date: Sat, 10 Aug 2024 11:28:44 +0100 Subject: [PATCH] fix: made get single product route public --- contributors.md | 1 + src/controllers/ProductController.ts | 4 ++-- src/routes/product.ts | 2 -- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/contributors.md b/contributors.md index a27e5ab6..093ab3e6 100644 --- a/contributors.md +++ b/contributors.md @@ -2,3 +2,4 @@ Erasmus Tayviah (StarmannRassy) [Adekolu Samuel Samixx](https://github.com/samixYasuke) [Micheal Peter] (https://github.com/myconpeter) +[Uzochukwu Onyekwelu] (https://github.com/Uzo-Felix) diff --git a/src/controllers/ProductController.ts b/src/controllers/ProductController.ts index 24d534b1..d7967a66 100644 --- a/src/controllers/ProductController.ts +++ b/src/controllers/ProductController.ts @@ -348,7 +348,7 @@ class ProductController { * description: The ID of the product to get * responses: * 200: - * description: Product retrieved successfully + * description: Product fetched successfully * content: * application/json: * schema: @@ -444,7 +444,7 @@ class ProductController { if (product) { res.status(200).json({ status_code: 200, - message: "Product retrieved successfully", + message: "Product fetched successfully", data: product, }); } diff --git a/src/routes/product.ts b/src/routes/product.ts index a0a03110..d2bb6fdc 100644 --- a/src/routes/product.ts +++ b/src/routes/product.ts @@ -33,8 +33,6 @@ productRouter.delete( productRouter.get( "/organizations/:org_id/products/:product_id", - authMiddleware, - validOrgAdmin, productController.getSingleProduct, );