Skip to content

Commit

Permalink
Brought back JS session expiration check
Browse files Browse the repository at this point in the history
  • Loading branch information
svera committed Jul 14, 2024
1 parent 0cba307 commit aebc32e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions internal/webserver/embedded/js/xh-error-check.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ document.body.addEventListener('htmx:afterRequest', function (evt) {
// Server error with response contents, equivalent to htmx:responseError
const xhr = evt.detail.xhr;
if (xhr.status == "403") {
location.reload()
}
if (xhr.status == "400") {
return
return location.reload()
}

console.warn("Server error", evt.detail)
Expand Down
2 changes: 1 addition & 1 deletion internal/webserver/embedded/views/users/edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,4 @@
</div>
</div>

<!--<script type="text/javascript" src="/js/xh-error-check.js"></script>-->
<script type="text/javascript" src="/js/xh-error-check.js"></script>

0 comments on commit aebc32e

Please sign in to comment.