This commit is contained in:
Mann Patel
2025-04-19 10:22:16 -06:00
parent dee6e3ce10
commit d169c9ba58
7 changed files with 135 additions and 127 deletions

View File

@@ -7,6 +7,7 @@ const {
getAllProducts,
getProductById,
addProduct,
myProduct,
} = require("../controllers/product");
const router = express.Router();
@@ -20,6 +21,7 @@ router.post("/addFavorite", addFavorite);
router.post("/getFavorites", getFavorites);
router.post("/delFavorite", removeFavorite);
router.post("/myProduct", myProduct);
router.post("/addProduct", addProduct);
router.get("/getProduct", getAllProducts);
router.get("/:id", getProductById); // Simplified route