Skip to content

Commit

Permalink
add routers for materials and ingredients
Browse files Browse the repository at this point in the history
  • Loading branch information
TristanZvunka committed Jan 23, 2024
1 parent a21cc95 commit c2f3362
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions backend/src/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ router.post(
// Import ingredientControllers module for handling item-related operations
const IngredientControllers = require("./controllers/ingredientControllers");

router.get("/ingredients", IngredientControllers.browse); // Route to get a list of items
router.get("/ingredient/:id", IngredientControllers.read); // Route to get a specific item by ID
router.get("/ingredientbyrecipe/:id", IngredientControllers.readByRecipe); // Route to get ingredients for a specific Recipe

Expand All @@ -77,6 +78,7 @@ router.get("/ingredientbyrecipe/:id", IngredientControllers.readByRecipe); // Ro
// Import materialControllers module for handling item-related operations
const MaterialControllers = require("./controllers/materialControllers");

router.get("/materials", MaterialControllers.browse); // Route to get a list of items
router.get("/material/:id", MaterialControllers.read); // Route to get a specific item by ID
router.get("/materialByRecipe/:id", MaterialControllers.readByRecipe); // Route to get materials for a specific Recipe

Expand Down

0 comments on commit c2f3362

Please sign in to comment.