mirror of
https://github.com/Such-Software/wownerogue.git
synced 2026-12-03 04:13:57 +01:00
fix edge cases and tests
This commit is contained in:
+3
-3
@@ -446,7 +446,7 @@
|
||||
|
||||
<script>
|
||||
// State
|
||||
let apiKey = localStorage.getItem('adminApiKey') || '';
|
||||
let apiKey = sessionStorage.getItem('adminApiKey') || '';
|
||||
let currentTab = 'overview';
|
||||
let usersOffset = 0;
|
||||
let outcomesChart = null;
|
||||
@@ -487,7 +487,7 @@
|
||||
|
||||
if (res.ok) {
|
||||
apiKey = key;
|
||||
localStorage.setItem('adminApiKey', key);
|
||||
sessionStorage.setItem('adminApiKey', key);
|
||||
verifyAndShowDashboard();
|
||||
} else {
|
||||
document.getElementById('loginError').style.display = 'block';
|
||||
@@ -518,7 +518,7 @@
|
||||
|
||||
function logout() {
|
||||
apiKey = '';
|
||||
localStorage.removeItem('adminApiKey');
|
||||
sessionStorage.removeItem('adminApiKey');
|
||||
document.getElementById('loginModal').classList.remove('hidden');
|
||||
document.getElementById('dashboard').classList.add('hidden');
|
||||
document.getElementById('apiKeyInput').value = '';
|
||||
|
||||
Reference in New Issue
Block a user