aboutsummaryrefslogtreecommitdiff
path: root/web/app/controller/Root.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/app/controller/Root.js')
-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();
+ }
}
});