Merge pull request #16 from ANONYMOUSZED-beep/fix/database-concurrency-invariants

Enforce database concurrency invariants
This commit is contained in:
lezi authored and GitHub committed 2026-08-14 09:43:07 +08:00
commit bce8d1fdc7
6 files changed
+114 -31

No files matched your search

+2 -2
View File
@@ -35,10 +35,10 @@ const API = {
return data;
},
async register(email, password, username) {
async register(email, password, username, bootstrapToken = '') {
const data = await apiFetch('/auth/register', {
method: 'POST',
body: JSON.stringify({ email, password, username })
body: JSON.stringify({ email, password, username, bootstrap_token: bootstrapToken || undefined })
});
if (data.error) throw new Error(data.error);
return data;