routes.js 1.2 KB

1234567891011121314151617181920212223242526272829
  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/ingredients/update", home.updateMerchantIngredient);
  13. app.post("/merchant/recipes/ingredients/create", home.addRecipeIngredient);
  14. app.post("/merchant/recipes/ingredients/update", home.updateRecipeIngredient);
  15. app.post("/merchant/recipes/ingredients/remove", home.removeRecipeIngredient);
  16. //Ingredients
  17. app.get("/ingredients", home.getIngredients);
  18. app.post("/ingredients/create", home.createNewIngredients);
  19. app.post("/ingredients/createone", home.createIngredient); //also adds to merchant
  20. //Clover API
  21. app.get("/getrecipes", home.getCloverRecipes);
  22. //Other
  23. app.get("/unregistered", home.unregistered);
  24. }