aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/database
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/database')
-rw-r--r--src/org/traccar/database/DataManager.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/org/traccar/database/DataManager.java b/src/org/traccar/database/DataManager.java
index e249a7591..af2dd559a 100644
--- a/src/org/traccar/database/DataManager.java
+++ b/src/org/traccar/database/DataManager.java
@@ -321,6 +321,14 @@ public class DataManager implements IdentityManager {
AsyncServlet.sessionRefreshUser(userId);
}
+ public void unlinkDevice(long userId, long deviceId) throws SQLException {
+ QueryBuilder.create(dataSource, getQuery("database.unlinkDevice"))
+ .setLong("userId", userId)
+ .setLong("deviceId", deviceId)
+ .executeUpdate();
+ AsyncServlet.sessionRefreshUser(userId);
+ }
+
public Collection<Position> getPositions(long userId, long deviceId, Date from, Date to) throws SQLException {
return QueryBuilder.create(dataSource, getQuery("database.selectPositions"))
.setLong("deviceId", deviceId)