Bugfix: now storing event coords when creating/updating event
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
/* © SRSoftware 2024 */
|
||||
package de.srsoftware.cal;
|
||||
|
||||
import static de.srsoftware.cal.Util.extractCoords;
|
||||
import static de.srsoftware.cal.db.Fields.*;
|
||||
import static de.srsoftware.cal.db.Fields.AID;
|
||||
import static de.srsoftware.tools.Error.error;
|
||||
@@ -264,6 +265,7 @@ public class ApiEndpoint extends PathHandler {
|
||||
.ifPresent(event::add);
|
||||
});
|
||||
}
|
||||
if (json.has(COORDS)) extractCoords(json.getString(COORDS)).optional().ifPresent(event::coords);
|
||||
if (json.has(LINKS)) json.getJSONArray(LINKS).forEach(o -> {
|
||||
if (o instanceof JSONObject j) toLink(j).optional().ifPresent(event::addLinks);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user