fix auth and backend force

This commit is contained in:
Mateusz Gruszczyński
2026-07-26 16:06:30 +02:00
parent f145c3c121
commit 9b89ef79c4
6 changed files with 84 additions and 8 deletions
+2 -1
View File
@@ -102,7 +102,8 @@ async function openWorkspace() {
}
async function init() {
try {
info = await api(`/api/workspaces/${encodeURIComponent(slug)}`);
const headers = accessToken ? { Authorization: `Bearer ${accessToken}` } : {};
info = await api(`/api/workspaces/${encodeURIComponent(slug)}`, { headers });
document.querySelector("#workspace-title").textContent = info.title;
document.querySelector("#workspace-url").textContent = location.pathname;
if (info.protected && !accessToken) dialog.showModal(); else openWorkspace();