Renaming in database.java
This commit is contained in:
parent
d52e1507d7
commit
884662e409
1 changed files with 4 additions and 3 deletions
|
@ -34,14 +34,15 @@ public class Database {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getRawMaterials(Request req, Response res) {
|
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_name", "name");
|
||||||
|
result = result.replaceAll("ingredient_quantity", "amount");
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getCookies(Request req, Response res) {
|
public String getCookies(Request req, Response res) {
|
||||||
String result = selectQuery("cookies", "cookies", "recipe_name");
|
String result = selectQuery("cookies", "cookies", "cookie_name");
|
||||||
result = result.replaceAll("recipe_name", "name");
|
result = result.replaceAll("cookie_name", "name");
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue