Changeset 0.37.19 (#232)
Co-authored-by: gobha <jasafpro@gmail.com> Co-committed-by: gobha <jasafpro@gmail.com>
This commit is contained in:
@@ -193,7 +193,7 @@
|
||||
const name = window.prompt('Workspace name:');
|
||||
if (!name) return;
|
||||
try {
|
||||
const userId = sw.user?.id || window.__USER__?.id;
|
||||
const userId = sw.user?.id;
|
||||
if (!userId) throw new Error('Not authenticated');
|
||||
const resp = await API.createWorkspace({ name: name.trim(), owner_type: 'user', owner_id: userId });
|
||||
const newId = resp.id || resp.data?.id;
|
||||
@@ -264,7 +264,7 @@
|
||||
btn.disabled = true;
|
||||
btn.textContent = 'Creating\u2026';
|
||||
try {
|
||||
const userId = sw.user?.id || window.__USER__?.id;
|
||||
const userId = sw.user?.id;
|
||||
if (!userId) throw new Error('Not authenticated');
|
||||
const resp = await API.createWorkspace({ name, owner_type: 'user', owner_id: userId });
|
||||
const newId = resp.id || resp.data?.id;
|
||||
|
||||
Reference in New Issue
Block a user