aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/api/resource
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2023-12-03 14:08:07 -0800
committerAnton Tananaev <anton@traccar.org>2023-12-03 14:08:07 -0800
commit8999283ee7344fd7ec33c8a6cb5a7999e0592074 (patch)
tree7d9c69c34b04b74560fabd1a89c4a6042398613c /src/main/java/org/traccar/api/resource
parent1efe470d4df335dfaaad5a9e2c6417c24d8864e1 (diff)
downloadtrackermap-server-8999283ee7344fd7ec33c8a6cb5a7999e0592074.tar.gz
trackermap-server-8999283ee7344fd7ec33c8a6cb5a7999e0592074.tar.bz2
trackermap-server-8999283ee7344fd7ec33c8a6cb5a7999e0592074.zip
Update broadcast interface
Diffstat (limited to 'src/main/java/org/traccar/api/resource')
-rw-r--r--src/main/java/org/traccar/api/resource/PermissionsResource.java6
-rw-r--r--src/main/java/org/traccar/api/resource/ServerResource.java3
2 files changed, 6 insertions, 3 deletions
diff --git a/src/main/java/org/traccar/api/resource/PermissionsResource.java b/src/main/java/org/traccar/api/resource/PermissionsResource.java
index e8e4e96eb..2a8ac62f7 100644
--- a/src/main/java/org/traccar/api/resource/PermissionsResource.java
+++ b/src/main/java/org/traccar/api/resource/PermissionsResource.java
@@ -74,7 +74,8 @@ public class PermissionsResource extends BaseResource {
cacheManager.invalidatePermission(
true,
permission.getOwnerClass(), permission.getOwnerId(),
- permission.getPropertyClass(), permission.getPropertyId());
+ permission.getPropertyClass(), permission.getPropertyId(),
+ true);
LogAction.link(getUserId(),
permission.getOwnerClass(), permission.getOwnerId(),
permission.getPropertyClass(), permission.getPropertyId());
@@ -99,7 +100,8 @@ public class PermissionsResource extends BaseResource {
cacheManager.invalidatePermission(
true,
permission.getOwnerClass(), permission.getOwnerId(),
- permission.getPropertyClass(), permission.getPropertyId());
+ permission.getPropertyClass(), permission.getPropertyId(),
+ false);
LogAction.unlink(getUserId(),
permission.getOwnerClass(), permission.getOwnerId(),
permission.getPropertyClass(), permission.getPropertyId());
diff --git a/src/main/java/org/traccar/api/resource/ServerResource.java b/src/main/java/org/traccar/api/resource/ServerResource.java
index 8149ec3b8..bcd36a32e 100644
--- a/src/main/java/org/traccar/api/resource/ServerResource.java
+++ b/src/main/java/org/traccar/api/resource/ServerResource.java
@@ -16,6 +16,7 @@
package org.traccar.api.resource;
import org.traccar.api.BaseResource;
+import org.traccar.broadcast.ObjectOperation;
import org.traccar.config.Config;
import org.traccar.config.Keys;
import org.traccar.database.OpenIdProvider;
@@ -111,7 +112,7 @@ public class ServerResource extends BaseResource {
storage.updateObject(entity, new Request(
new Columns.Exclude("id"),
new Condition.Equals("id", entity.getId())));
- cacheManager.updateOrInvalidate(true, entity);
+ cacheManager.updateOrInvalidate(true, entity, ObjectOperation.UPDATE);
LogAction.edit(getUserId(), entity);
return Response.ok(entity).build();
}