diff options
Diffstat (limited to 'web/app/controller')
-rw-r--r-- | web/app/controller/Root.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/web/app/controller/Root.js b/web/app/controller/Root.js index 568b761d..e30446c9 100644 --- a/web/app/controller/Root.js +++ b/web/app/controller/Root.js @@ -34,11 +34,18 @@ Ext.define('Traccar.controller.Root', { }, onServerReturn: function (options, success, response) { + var token, parameters = {}; if (success) { Traccar.app.setServer(Ext.decode(response.responseText)); + token = Ext.Object.fromQueryString(window.location.search).token; + if (token) { + parameters.token = token; + } Ext.Ajax.request({ scope: this, url: 'api/session', + method: 'GET', + params: parameters, callback: this.onSessionReturn }); } else { |