routes.js 1.4 KB

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