Fix page expired 419 started showing a page expired message, instead of refreshing the session and loading the clicked item on the tree

This commit is contained in:
Deon George 2025-06-16 20:04:05 +10:00
parent deefd9be43
commit d294c9449d

4
public/js/custom.js vendored
View File

@ -37,10 +37,10 @@ function getNode(item) {
$('.main-content').empty().append(e.responseText);
break;
case 409: // Not in root
location.replace('/#'+item);
break;
case 419: // Session Expired
location.replace('/#'+item);
// When the session expires, and we are in the tree, we need to force a reload
if (location.pathname === '/')
location.reload();
break;
case 500: