Browse Source

Decided not to change frontend error handling. It is good enough for now.

Lee Morgan 6 years ago
parent
commit
dd26a83405
2 changed files with 2 additions and 3 deletions
  1. 0 1
      controllers/merchantData.js
  2. 2 2
      views/inventoryPage/addIngredient.js

+ 0 - 1
controllers/merchantData.js

@@ -4,7 +4,6 @@ const bcrypt = require("bcryptjs");
 const Error = require("../models/error");
 const Merchant = require("../models/merchant");
 const Recipe = require("../models/recipe");
-const Ingredient = require("../models/ingredient");
 const InventoryAdjustment = require("../models/inventoryAdjustment");
 
 const token = "b48068eb-411a-918e-ea64-52007147e42c";

+ 2 - 2
views/inventoryPage/addIngredient.js

@@ -28,7 +28,7 @@ let addIngredientObj = {
                 }
             })
             .catch((err)=>{
-                banner.createError("Could not reach the database");
+                banner.createError("Error: Could not retrieve ingredients");
             });
     },
 
@@ -53,7 +53,7 @@ let addIngredientObj = {
                     }
                 })
                 .catch((err)=>{
-                    banner.createError("Something went wrong and the ingredient could not be added");
+                    banner.createError("Error: Unable to add ingredient");
                 });
         }
     },