Merge pull request #16 from ANONYMOUSZED-beep/fix/database-concurrency-invariants
Enforce database concurrency invariants
This commit is contained in:
6 files changed
+114
-31
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user