routes.js 1.2 KB

123456789101112131415161718192021222324252627282930
  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", home.merchantSetup);
  7. app.get("/recipes", home.displayRecipes);
  8. //Merchant
  9. app.get("/merchant/recipes/update", home.updateRecipes);
  10. app.post("/merchant/create", home.createMerchant);
  11. app.post("/merchant/ingredients/create", home.addMerchantIngredient);
  12. app.post("/merchant/ingredients/remove", home.removeMerchantIngredient);
  13. app.post("/merchant/ingredients/update", home.updateMerchantIngredient);
  14. app.post("/merchant/recipes/ingredients/create", home.addRecipeIngredient);
  15. app.post("/merchant/recipes/ingredients/update", home.updateRecipeIngredient);
  16. app.post("/merchant/recipes/ingredients/remove", home.removeRecipeIngredient);
  17. //Ingredients
  18. app.get("/ingredients", home.getIngredients);
  19. app.post("/ingredients/create", home.createNewIngredients);
  20. app.post("/ingredients/createone", home.createIngredient); //also adds to merchant
  21. //Clover API
  22. app.get("/getrecipes", home.getCloverRecipes);
  23. //Other
  24. app.get("/unregistered", home.unregistered);
  25. }