routes.js 1.0 KB

12345678910111213141516171819202122232425
  1. const home = require("./controllers/home");
  2. module.exports = function(app){
  3. //Render page
  4. app.get("/", home.displayInventory);
  5. app.get("/merchant/new", home.merchantSetup);
  6. app.get("/recipes", home.displayRecipes);
  7. //Merchant
  8. app.get("/merchant/recipes/update", home.updateRecipes);
  9. app.post("/merchant/create", home.createMerchant);
  10. app.post("/merchant/ingredients/create", home.addMerchantIngredient);
  11. app.post("/merchant/ingredients/remove", home.removeMerchantIngredient);
  12. app.post("/merchant/recipes/ingredients/create", home.addRecipeIngredient);
  13. app.post("/merchant/recipes/ingredients/update", home.updateRecipeIngredient);
  14. app.post("/merchant/recipes/ingredients/remove", home.removeRecipeIngredient);
  15. //Ingredients
  16. app.get("/ingredients", home.getIngredients);
  17. app.post("/ingredients/create", home.createNewIngredients);
  18. app.post("/ingredients/createone", home.createIngredient); //also adds to merchant
  19. //Clover API
  20. app.get("/getrecipes", home.getCloverRecipes);
  21. }