Renaming in database.java

This commit is contained in:
Imbus 2024-05-04 13:45:38 +02:00
parent d52e1507d7
commit 884662e409

View file

@ -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;
}