Fixat getRawMaterials och getCookies

This commit is contained in:
Ivan Bogosavljevic 2024-04-17 10:28:01 +02:00
parent 236d0d43b5
commit 7a5ade039d

View file

@ -52,11 +52,18 @@ public class Database {
} }
public String getRawMaterials(Request req, Response res) { public String getRawMaterials(Request req, Response res) {
return "{}"; String query = "SELECT name, stock as amount, unit FROM Ingredient";
String title = "raw-materials";
return getJson(query, title);
} }
public String getCookies(Request req, Response res) { public String getCookies(Request req, Response res) {
return "{\"cookies\":[]}"; String query = "Select name from Cookie";
String title = "cookies";
return getJson(query, title);
} }
public String getRecipes(Request req, Response res) { public String getRecipes(Request req, Response res) {