From 884662e40990b0ac8a19b5812fdfb3afea9e3ddf Mon Sep 17 00:00:00 2001 From: Imbus <> Date: Sat, 4 May 2024 13:45:38 +0200 Subject: [PATCH] Renaming in database.java --- app/src/main/java/krusty/Database.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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; }