Change traccar port

merge-requests/926/head
shamalka 2 years ago
parent 1bd87e15f1
commit dac4e80df5

@ -403,6 +403,9 @@ public class TraccarClientImpl implements TraccarClient {
authorizedKey(HttpReportingUtil.trackerUser(), HttpReportingUtil.trackerPassword()),
serverUrl(HttpReportingUtil.trackerServer())));
String result = res.get();
log.info("---------result--------");
log.info("---------result--------" + res.isDone());
log.info("---------result-------- " + result);
if (result.charAt(0) == '{') {
JSONObject obj = new JSONObject(result);
if (obj.has("id")) {
@ -581,8 +584,9 @@ public class TraccarClientImpl implements TraccarClient {
authorizedKey(HttpReportingUtil.trackerUser(), HttpReportingUtil.trackerPassword()),
serverUrl(HttpReportingUtil.trackerServer())));
String result = res.get();
log.info("---------result--------");
if (result.charAt(0) == '{') {
// log.info(result);
// log.info("---------result--------");
if (res.isDone() && result.charAt(0) == '{') {
JSONObject obj = new JSONObject(result);
if (obj.has("id")) {
int traccarGroupId = obj.getInt("id");

@ -28,7 +28,7 @@
<Property name="sample-property">sample</Property>
<Property name="api-endpoint">http://localhost:</Property>
<Property name="default-port"></Property>
<Property name="location-update-port">5055</Property>
<Property name="location-update-port">8085</Property>
<Property name="authorization">Authorization</Property>
<Property name="authorization-key">Basic YWRtaW46YWRtaW4=</Property>
</Properties>

Loading…
Cancel
Save