diff --git a/public/app.js b/public/app.js index 9fb340f..9917adc 100644 --- a/public/app.js +++ b/public/app.js @@ -90,11 +90,12 @@ async function checkAuth() { } } -function onLoggedIn() { +async function onLoggedIn() { document.getElementById('main-nav').classList.remove('hidden'); document.getElementById('nav-username').textContent = state.user.user; document.getElementById('nav-admin').classList.toggle('hidden', state.user.role !== 'admin'); - state.stratagems = window.STRATAGEMS || []; + // Stratagems are served via authenticated API – not as a public static file + state.stratagems = await api('GET', '/stratagems').catch(() => []); connectWS(); showView('dashboard'); } diff --git a/public/index.html b/public/index.html index f62a8b1..512324e 100644 --- a/public/index.html +++ b/public/index.html @@ -340,7 +340,6 @@
-