aboutsummaryrefslogtreecommitdiff
path: root/web/app/Application.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-09-17 16:57:31 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-09-17 16:57:31 +1200
commit8baf73493d24c85bc5d13069044fc1150ed62c2e (patch)
treece421f9431ac3e13e91817bfd989bcd272034649 /web/app/Application.js
parent4154c2cd31f23c5d5fb336dfcd68ba192b297f93 (diff)
downloadtrackermap-server-8baf73493d24c85bc5d13069044fc1150ed62c2e.tar.gz
trackermap-server-8baf73493d24c85bc5d13069044fc1150ed62c2e.tar.bz2
trackermap-server-8baf73493d24c85bc5d13069044fc1150ed62c2e.zip
Move login calls to controller
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() {