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