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.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/web/app/Application.js b/web/app/Application.js
index c488818a4..1a9326dd1 100644
--- a/web/app/Application.js
+++ b/web/app/Application.js
@@ -51,8 +51,11 @@ Ext.define('Traccar.Application', {
'Root'
],
- setUser: function(user) {
- this.user = user;
+ setUser: function(data) {
+ var reader = Ext.create('Ext.data.reader.Json', {
+ model: 'Traccar.model.User'
+ });
+ this.user = reader.readRecords(data).getRecords()[0];
},
getUser: function() {