Fix json, timestamp is now a String, it was include as native data (not recognise in javascript parser) for all chapters list

This commit is contained in:
Francois G 2023-03-19 17:25:55 +01:00
parent e983ab5445
commit a47992e19a

View file

@ -34,8 +34,8 @@ public class ChapterList 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());
chaptersJSON.add(chapterJSON);
}
writer.write(chaptersJSON.toJSONString());