From f9a564f5cf8859a92e8b8f18be9c1ad9df60f514 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Thu, 13 Aug 2020 20:38:29 -0700 Subject: Option to load server model from db --- src/main/java/org/traccar/api/resource/ServerResource.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/main/java') 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 -- cgit v1.2.3