aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/api/resource/GeofenceResource.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/api/resource/GeofenceResource.java')
-rw-r--r--src/org/traccar/api/resource/GeofenceResource.java6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/org/traccar/api/resource/GeofenceResource.java b/src/org/traccar/api/resource/GeofenceResource.java
index c39d882b6..df4947a1b 100644
--- a/src/org/traccar/api/resource/GeofenceResource.java
+++ b/src/org/traccar/api/resource/GeofenceResource.java
@@ -35,7 +35,6 @@ import javax.ws.rs.core.Response;
import java.sql.SQLException;
import java.util.Collection;
import java.util.HashSet;
-import java.util.LinkedHashMap;
import java.util.Set;
@Path("geofences")
@@ -86,10 +85,7 @@ public class GeofenceResource extends BaseResource {
public Response add(Geofence entity) throws SQLException {
Context.getPermissionsManager().checkReadonly(getUserId());
Context.getGeofenceManager().addItem(entity);
- LinkedHashMap<String, Long> link = new LinkedHashMap<>();
- link.put("userId", getUserId());
- link.put("geofenceId", entity.getId());
- Context.getDataManager().linkObject(link, true);
+ linkNew(entity);
Context.getGeofenceManager().refreshUserItems();
return Response.ok(entity).build();
}