From 3da27c5f9f16a2192cb5993c38c1028aea42e559 Mon Sep 17 00:00:00 2001 From: kennyg37 Date: Thu, 25 Apr 2024 16:30:43 +0200 Subject: [PATCH] finalizing --- src/js/admin.js | 4 ++-- src/pages/404.html | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 src/pages/404.html diff --git a/src/js/admin.js b/src/js/admin.js index 0d212be..01dfa75 100644 --- a/src/js/admin.js +++ b/src/js/admin.js @@ -2,7 +2,7 @@ function checkToken() { const token = localStorage.getItem('jwtToken'); if (!token) { - window.location.href = './index.html'; + window.location.href = '/404.html'; } } @@ -13,7 +13,7 @@ window.onload = function() { function logout() { localStorage.removeItem('jwtToken'); - window.location.href = './index.html'; + window.location.href = '../index.html'; } diff --git a/src/pages/404.html b/src/pages/404.html new file mode 100644 index 0000000..9fa8e64 --- /dev/null +++ b/src/pages/404.html @@ -0,0 +1,40 @@ + + + + + + +404 Not Found + + + +

404 - Page Not Found

+

The page you are looking for might have been removed, had its name changed, temporarily unavailable or you're simply not authorized to access this Page

+

Please go to the homepage and log in.

+ + \ No newline at end of file