aboutsummaryrefslogtreecommitdiff
path: root/web/app
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-04-02 10:42:45 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2017-04-02 10:42:45 +1200
commit47eff075095604afa7405993ce2d7b4ae29fc939 (patch)
treec46ae610423bc1685d160332fb36804607889122 /web/app
parent4511a6b22adc3295beaac15c34feb1605a5b9222 (diff)
downloadtrackermap-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.js5
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();
+ }
}
});