aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/Context.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-06-16 06:48:48 -0700
committerAnton Tananaev <anton@traccar.org>2022-06-16 06:48:48 -0700
commit481a902538b951a420d00c32063e0984e4e922d6 (patch)
tree8379348f3ec40b465a395ed4bb332132d7292ce9 /src/main/java/org/traccar/Context.java
parentca884b765f3f7a642c435be886dbec40f9d1f661 (diff)
downloadtrackermap-server-481a902538b951a420d00c32063e0984e4e922d6.tar.gz
trackermap-server-481a902538b951a420d00c32063e0984e4e922d6.tar.bz2
trackermap-server-481a902538b951a420d00c32063e0984e4e922d6.zip
Inject data source
Diffstat (limited to 'src/main/java/org/traccar/Context.java')
-rw-r--r--src/main/java/org/traccar/Context.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/Context.java b/src/main/java/org/traccar/Context.java
index 5eaa1e15c..00ab05d57 100644
--- a/src/main/java/org/traccar/Context.java
+++ b/src/main/java/org/traccar/Context.java
@@ -28,6 +28,7 @@ import org.traccar.model.BaseModel;
import org.traccar.model.Device;
import org.traccar.model.Group;
import org.traccar.session.ConnectionManager;
+import org.traccar.storage.Storage;
public final class Context {
@@ -82,7 +83,7 @@ public final class Context {
}
if (config.hasKey(Keys.DATABASE_URL)) {
- dataManager = new DataManager(config);
+ dataManager = new DataManager(config, Main.getInjector().getInstance(Storage.class));
}
if (dataManager != null) {
@@ -93,7 +94,8 @@ public final class Context {
identityManager = deviceManager;
- permissionsManager = new PermissionsManager(dataManager, dataManager.getStorage());
+ permissionsManager = new PermissionsManager(
+ dataManager, Main.getInjector().getInstance(Storage.class));
}