added url to json
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
@@ -150,7 +150,7 @@ public class BaseAppointment implements Appointment {
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject json() {
|
||||
public JSONObject json(String urlTemplate) {
|
||||
var json = new JSONObject();
|
||||
json.put("attachments", attachments.stream().map(Attachment::json).toList());
|
||||
json.put("coords", nullable(coords).map(Coords::json).orElse(null));
|
||||
@@ -162,7 +162,7 @@ public class BaseAppointment implements Appointment {
|
||||
json.put("tags", tags());
|
||||
json.put("title", title());
|
||||
json.put("links", links().stream().map(Link::json).toList());
|
||||
|
||||
json.put("url",urlTemplate.replace("{}",""+id()));
|
||||
return json;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user