aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2020-08-13 20:38:29 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2020-08-13 20:38:29 -0700
commitf9a564f5cf8859a92e8b8f18be9c1ad9df60f514 (patch)
tree3590b2b75e6dfc76fee6b68ff854e210159758c1
parent6e2af295d0ef6bfa9b033810ce2e16e3122de38a (diff)
downloadtrackermap-server-f9a564f5cf8859a92e8b8f18be9c1ad9df60f514.tar.gz
trackermap-server-f9a564f5cf8859a92e8b8f18be9c1ad9df60f514.tar.bz2
trackermap-server-f9a564f5cf8859a92e8b8f18be9c1ad9df60f514.zip
Option to load server model from db
-rw-r--r--src/main/java/org/traccar/api/resource/ServerResource.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/main/java/org/traccar/api/resource/ServerResource.java b/src/main/java/org/traccar/api/resource/ServerResource.java
index e7cad2a0c..91488afff 100644
--- a/src/main/java/org/traccar/api/resource/ServerResource.java
+++ b/src/main/java/org/traccar/api/resource/ServerResource.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 - 2017 Anton Tananaev (anton@traccar.org)
+ * Copyright 2015 - 2020 Anton Tananaev (anton@traccar.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -38,8 +38,12 @@ public class ServerResource extends BaseResource {
@PermitAll
@GET
- public Server get() throws SQLException {
- return Context.getPermissionsManager().getServer();
+ public Server get(@QueryParam("force") boolean force) throws SQLException {
+ if (force) {
+ return Context.getDataManager().getServer();
+ } else {
+ return Context.getPermissionsManager().getServer();
+ }
}
@PUT