diff --git a/app/src/main/java/krusty/Database.java b/app/src/main/java/krusty/Database.java index 3873eef..08e80b8 100644 --- a/app/src/main/java/krusty/Database.java +++ b/app/src/main/java/krusty/Database.java @@ -34,14 +34,15 @@ public class Database { } public String getRawMaterials(Request req, Response res) { - String result = selectQuery("ingredients", "raw-materials", "ingredient_name", "amount", "unit"); + String result = selectQuery("raw_materials", "raw-materials", "ingredient_name", "ingredient_quantity", "unit"); result = result.replaceAll("ingredient_name", "name"); + result = result.replaceAll("ingredient_quantity", "amount"); return result; } public String getCookies(Request req, Response res) { - String result = selectQuery("cookies", "cookies", "recipe_name"); - result = result.replaceAll("recipe_name", "name"); + String result = selectQuery("cookies", "cookies", "cookie_name"); + result = result.replaceAll("cookie_name", "name"); return result; }