added check to get user token before loading data
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user