diff --git a/app/Migrations/initial-data.sql b/app/Migrations/initial-data.sql index 25de406..1fd9348 100644 --- a/app/Migrations/initial-data.sql +++ b/app/Migrations/initial-data.sql @@ -12,7 +12,7 @@ VALUES (8, 'Småbröd AB', 'Malmö'); INSERT -OR IGNORE INTO cookies (cookie_name) +OR IGNORE INTO recipes (recipe_name) VALUES ('Nut ring'), ('Nut cookie'), @@ -22,7 +22,7 @@ VALUES ('Berliner'); INSERT -OR IGNORE INTO raw_materials(ingredient_name, ingredient_quantity, unit) +OR IGNORE INTO ingredients (ingredient_name, amount, unit) VALUES ('Bread crumbs', 500000, 'g'), ('Butter', 500000, 'g'), diff --git a/app/src/main/java/krusty/Database.java b/app/src/main/java/krusty/Database.java index 3873eef..e14a4e5 100644 --- a/app/src/main/java/krusty/Database.java +++ b/app/src/main/java/krusty/Database.java @@ -40,7 +40,7 @@ public class Database { } public String getCookies(Request req, Response res) { - String result = selectQuery("cookies", "cookies", "recipe_name"); + String result = selectQuery("recipes", "cookies", "recipe_name"); result = result.replaceAll("recipe_name", "name"); return result; }