added check to get user token before loading data

This commit is contained in:
Brian Bjarke Jensen
2025-11-13 19:31:36 +01:00
parent 1d641288e5
commit 753339c28a
13 changed files with 112 additions and 100 deletions
+2 -4
View File
@@ -189,12 +189,10 @@
</form>
</div>
<script src="/auth-utils.js"></script>
<script>
// Check if user is authenticated
const token = localStorage.getItem("access_token");
if (!token) {
window.location.href = "/login.html";
}
const token = getToken();
// Determine return URL based on referrer
function getReturnUrl() {