diff --git a/wwwroot/app.js b/wwwroot/app.js index 63be5b5..d69eeca 100644 --- a/wwwroot/app.js +++ b/wwwroot/app.js @@ -341,7 +341,10 @@ function setupHandlers() { try { await adminApi.setPhase(phase); toast("Phase updated"); + state.prevPhase = state.phase; state.phase = phase; + state.votesRendered = false; + renderPhasePill(); $("phase-select").dataset.userEditing = ""; await refreshPhaseData(); } catch (err) { diff --git a/wwwroot/js/api.js b/wwwroot/js/api.js index 1f4001a..b078dcf 100644 --- a/wwwroot/js/api.js +++ b/wwwroot/js/api.js @@ -11,6 +11,7 @@ const withBase = (path) => `${basePath}${path}`; async function request(path, { method = "GET", body } = {}) { const res = await fetch(withBase(path), { method, + credentials: "same-origin", headers: defaultHeaders, body: body ? JSON.stringify(body) : undefined, });