Преглед изворни кода

Rename a controller function to better represent its functionality.

Lee Morgan пре 5 година
родитељ
комит
52512899df
2 измењених фајлова са 2 додато и 2 уклоњено
  1. 1 1
      controllers/merchantData.js
  2. 1 1
      routes.js

+ 1 - 1
controllers/merchantData.js

@@ -80,7 +80,7 @@ module.exports = {
         quantity: change in quantity
     }]
     */
-    updateMerchantIngredient: function(req, res){
+    updateIngredientQuantities: function(req, res){
         let adjustments = [];
         let changedIngredients = [];
         res.locals.merchant

+ 1 - 1
routes.js

@@ -24,7 +24,7 @@ module.exports = function(app){
     
     //Merchant
     app.post("/merchant/create/none", merchantData.createMerchantNone);
-    app.put("/merchant/ingredients/update", session, merchantData.updateMerchantIngredient); //also updates some data in ingredients
+    app.put("/merchant/ingredients/update", session, merchantData.updateIngredientQuantities); //also updates some data in ingredients
     app.post("/merchant/password", merchantData.updatePassword); //TODO: change to work with session
 
     //Ingredients