diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-04-02 10:42:45 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2017-04-02 10:42:45 +1200 |
commit | 47eff075095604afa7405993ce2d7b4ae29fc939 (patch) | |
tree | c46ae610423bc1685d160332fb36804607889122 /web/app | |
parent | 4511a6b22adc3295beaac15c34feb1605a5b9222 (diff) | |
download | trackermap-web-47eff075095604afa7405993ce2d7b4ae29fc939.tar.gz trackermap-web-47eff075095604afa7405993ce2d7b4ae29fc939.tar.bz2 trackermap-web-47eff075095604afa7405993ce2d7b4ae29fc939.zip |
Return to login if authentication error
Diffstat (limited to 'web/app')
-rw-r--r-- | web/app/controller/Root.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/web/app/controller/Root.js b/web/app/controller/Root.js index 3bcc7bc5..afdbea62 100644 --- a/web/app/controller/Root.js +++ b/web/app/controller/Root.js @@ -142,6 +142,11 @@ Ext.define('Traccar.controller.Root', { url: 'api/devices', success: function (response) { self.updateDevices(Ext.decode(response.responseText)); + }, + failure: function(response) { + if (response.status === 401) { + window.location.reload(); + } } }); |