summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2018-10-16 14:24:36 +0300
committerAndrew Dolgov <[email protected]>2018-10-16 14:24:36 +0300
commitff872c4a89ca973cd9c7c83dc57c345cc3ee07e0 (patch)
treeee6fb2674d73bbf2dcd86371e176907a575b5a28
parent8aac1bb37b012b33391ff5df4d8f9a09b2ef7a11 (diff)
reader: if 401 is received on last page operations, redirect to index/login
-rw-r--r--js/read.js5
-rw-r--r--read.html10
2 files changed, 15 insertions, 0 deletions
diff --git a/js/read.js b/js/read.js
index a5698ff..d4c2f36 100644
--- a/js/read.js
+++ b/js/read.js
@@ -58,6 +58,11 @@ function open_lastread() {
}
}
+ })
+ .fail(function(e) {
+ if (e && e.status == 401) {
+ window.location = "index.php";
+ }
});
}
diff --git a/read.html b/read.html
index 0a0f02e..c116c2a 100644
--- a/read.html
+++ b/read.html
@@ -313,6 +313,11 @@
if (data.cfi) {
_last_position_sync = new Date().getTime()/1000;
}
+ })
+ .fail(function(e) {
+ if (e && e.status == 401) {
+ window.location = "index.php";
+ }
});
});
@@ -830,6 +835,11 @@
_last_position_sync = new Date().getTime()/1000;
}
+ })
+ .fail(function(e) {
+ if (e && e.status == 401) {
+ window.location = "index.php";
+ }
});
_store_position = 0;