aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/src/meshbay_hub/static/keyderive.js
diff options
context:
space:
mode:
Diffstat (limited to 'packages/meshbay-hub/src/meshbay_hub/static/keyderive.js')
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/keyderive.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/keyderive.js b/packages/meshbay-hub/src/meshbay_hub/static/keyderive.js
index d847aab..9f28b5c 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/keyderive.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/keyderive.js
@@ -355,7 +355,9 @@ async function registerUser(username, email, password, recoveryMnemonic, captcha
});
if (!resp.ok) throw new Error(`Registration failed: ${await resp.text()}`);
- return { registered: true };
+ let userId = null;
+ try { userId = (await resp.json()).user_id || null; } catch { /* no body */ }
+ return { registered: true, userId };
}
/**