diff --git a/src/main/java/krusty/Database.java b/src/main/java/krusty/Database.java index a9a7cac..ebf0683 100644 --- a/src/main/java/krusty/Database.java +++ b/src/main/java/krusty/Database.java @@ -81,8 +81,27 @@ public class Database { } 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 så man slipper kalla på jsonizer varje gång try {