fix auth and backend force
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user