diff options
Diffstat (limited to 'src/org/traccar/api/resource/CalendarResource.java')
-rw-r--r-- | src/org/traccar/api/resource/CalendarResource.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/org/traccar/api/resource/CalendarResource.java b/src/org/traccar/api/resource/CalendarResource.java index d29080ee2..30f5df6b8 100644 --- a/src/org/traccar/api/resource/CalendarResource.java +++ b/src/org/traccar/api/resource/CalendarResource.java @@ -66,7 +66,7 @@ public class CalendarResource extends BaseResource { public Response add(Calendar entity) throws SQLException { Context.getPermissionsManager().checkReadonly(getUserId()); Context.getCalendarManager().addItem(entity); - linkNew(entity); + linkNewEntity(entity); Context.getCalendarManager().refreshUserItems(); return Response.ok(entity).build(); } @@ -75,7 +75,7 @@ public class CalendarResource extends BaseResource { @PUT public Response update(Calendar entity) throws SQLException { Context.getPermissionsManager().checkReadonly(getUserId()); - Context.getPermissionsManager().checkPermission(Context.TYPE_CALENDAR, getUserId(), entity.getId()); + Context.getPermissionsManager().checkPermission(Calendar.class, getUserId(), entity.getId()); Context.getCalendarManager().updateItem(entity); return Response.ok(entity).build(); } @@ -84,7 +84,7 @@ public class CalendarResource extends BaseResource { @DELETE public Response remove(@PathParam("id") long id) throws SQLException { Context.getPermissionsManager().checkReadonly(getUserId()); - Context.getPermissionsManager().checkPermission(Context.TYPE_CALENDAR, getUserId(), id); + Context.getPermissionsManager().checkPermission(Calendar.class, getUserId(), id); Context.getCalendarManager().removeItem(id); return Response.noContent().build(); } |