aboutsummaryrefslogtreecommitdiff
path: root/web/app/Application.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/app/Application.js')
-rw-r--r--web/app/Application.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/web/app/Application.js b/web/app/Application.js
index 1a9326dd1..67dc96536 100644
--- a/web/app/Application.js
+++ b/web/app/Application.js
@@ -62,8 +62,11 @@ Ext.define('Traccar.Application', {
return this.user;
},
- setServer: function(server) {
- this.server = server;
+ setServer: function(data) {
+ var reader = Ext.create('Ext.data.reader.Json', {
+ model: 'Traccar.model.Server'
+ });
+ this.server = reader.readRecords(data).getRecords()[0];
},
getServer: function() {
@@ -73,5 +76,4 @@ Ext.define('Traccar.Application', {
getPreference: function(key, defaultValue) {
return this.getUser().get(key) || this.getServer().get(key) || defaultValue;
}
-
});