diff --git a/src/be/jeffcheasey88/peeratcode/routes/ChapterElement.java b/src/be/jeffcheasey88/peeratcode/routes/ChapterElement.java index 9823918..0f3794f 100644 --- a/src/be/jeffcheasey88/peeratcode/routes/ChapterElement.java +++ b/src/be/jeffcheasey88/peeratcode/routes/ChapterElement.java @@ -32,8 +32,8 @@ public class ChapterElement implements Response { JSONObject chapterJSON = new JSONObject(); chapterJSON.put("id", chapter.getId()); chapterJSON.put("name", chapter.getName()); - if (chapter.getStartDate() != null) chapterJSON.put("startDate", chapter.getStartDate()); - if (chapter.getEndDate() != null) chapterJSON.put("endDate", chapter.getEndDate()); + if (chapter.getStartDate() != null) chapterJSON.put("startDate", chapter.getStartDate().toString()); + if (chapter.getEndDate() != null) chapterJSON.put("endDate", chapter.getEndDate().toString()); JSONArray puzzles = new JSONArray(); for (Puzzle puzzle : chapter.getPuzzles()) { JSONObject puzzleJSON = new JSONObject();