Skip to content

Commit

Permalink
change redir url for failed slide gets
Browse files Browse the repository at this point in the history
  • Loading branch information
birm authored Jan 9, 2025
1 parent 32d4e58 commit c8d1497
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions common/PathdbMods.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ async function PathDbMods() {
console.log(response);
if (!response.ok) {
console.log("response not ok", response.statusText);
// construct pathdb login w redirect. needs relative path, and needs escaped &.
let thisurl = window.location.pathname + window.location.search;
$D.pages.table = "/user/login?destination=" + thisurl.slice(1).replaceAll("&","%26");
return {
error: !response.ok,
text: response.statusText,
Expand All @@ -126,6 +129,9 @@ async function PathDbMods() {
})
}).then(function(response) {
console.log(response);
// construct pathdb login w redirect. needs relative path, and needs escaped &.
let thisurl = window.location.pathname + window.location.search;
$D.pages.table = "/user/login?destination=" + thisurl.slice(1).replaceAll("&","%26");
if (!response.ok){
console.log("response not ok", response.statusText);
return {
Expand Down

0 comments on commit c8d1497

Please sign in to comment.