aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/traccar/api/resource/PermissionsResource.java9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/main/java/org/traccar/api/resource/PermissionsResource.java b/src/main/java/org/traccar/api/resource/PermissionsResource.java
index 7502e9134..0acca5273 100644
--- a/src/main/java/org/traccar/api/resource/PermissionsResource.java
+++ b/src/main/java/org/traccar/api/resource/PermissionsResource.java
@@ -18,6 +18,7 @@ package org.traccar.api.resource;
import java.sql.SQLException;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.List;
@@ -59,9 +60,7 @@ public class PermissionsResource extends BaseResource {
@POST
public Response add(LinkedHashMap<String, Long> entity) throws SQLException, ClassNotFoundException {
- List<LinkedHashMap<String, Long>> list = new ArrayList<>();
- list.add(entity);
- return add(list);
+ return add(Collections.singletonList(entity));
}
@Path("bulk")
@@ -85,9 +84,7 @@ public class PermissionsResource extends BaseResource {
@DELETE
public Response remove(LinkedHashMap<String, Long> entity) throws SQLException, ClassNotFoundException {
- List<LinkedHashMap<String, Long>> list = new ArrayList<>();
- list.add(entity);
- return remove(list);
+ return remove(Collections.singletonList(entity));
}
@DELETE