aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/api/resource/CalendarResource.java
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2017-07-21 11:55:38 +0500
committerAbyss777 <abyss@fox5.ru>2017-07-21 11:55:38 +0500
commitf77912f14ed17bfbe533b664b6b82154c80e3b58 (patch)
tree62ad0749e28740be85743caa097afac516768302 /src/org/traccar/api/resource/CalendarResource.java
parentb22735e5dbc22539a6bf9d36cff042094c50d927 (diff)
downloadtrackermap-server-f77912f14ed17bfbe533b664b6b82154c80e3b58.tar.gz
trackermap-server-f77912f14ed17bfbe533b664b6b82154c80e3b58.tar.bz2
trackermap-server-f77912f14ed17bfbe533b664b6b82154c80e3b58.zip
- Combine all permissions to one resource
- Add two helpers to BaseResource
Diffstat (limited to 'src/org/traccar/api/resource/CalendarResource.java')
-rw-r--r--src/org/traccar/api/resource/CalendarResource.java6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/org/traccar/api/resource/CalendarResource.java b/src/org/traccar/api/resource/CalendarResource.java
index f4ff9d4e9..0666f2fed 100644
--- a/src/org/traccar/api/resource/CalendarResource.java
+++ b/src/org/traccar/api/resource/CalendarResource.java
@@ -18,7 +18,6 @@ package org.traccar.api.resource;
import java.sql.SQLException;
import java.util.Collection;
-import java.util.LinkedHashMap;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
@@ -67,10 +66,7 @@ public class CalendarResource extends BaseResource {
public Response add(Calendar entity) throws SQLException {
Context.getPermissionsManager().checkReadonly(getUserId());
Context.getCalendarManager().addItem(entity);
- LinkedHashMap<String, Long> link = new LinkedHashMap<>();
- link.put("userId", getUserId());
- link.put("calendarId", entity.getId());
- Context.getDataManager().linkObject(link, true);
+ linkNew(entity);
Context.getCalendarManager().refreshUserItems();
return Response.ok(entity).build();
}