routes.js 1.3 KB

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