Börjat lite med createPallet men ej klar. följt compendiet kanske ej rätt

This commit is contained in:
Ivan Bogosavljevic 2024-04-17 18:53:14 +02:00
parent ef3aecfe38
commit 051c15d8d3

View file

@ -81,8 +81,27 @@ public class Database {
} }
public String createPallet(Request req, Response res) { public String createPallet(Request req, Response res) {
return "{}";
} if (req.queryParams("cookie") != null) {
String cookie = req.queryParams("cookie");
return createPallet(cookie);
} else {
return "";
}
}
protected String createPallet(String cookie) {
String query = "";
try (PreparedStatement stmt = conn.prepareStatement(query)) {
} catch (SQLException e) {
return "";
}
return "";
}
private String getJson(String query, String title) { //privat hjälpmetod man slipper kalla jsonizer varje gång private String getJson(String query, String title) { //privat hjälpmetod man slipper kalla jsonizer varje gång
try { try {