public
/
ndcode_site.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
New approach to sign up form
[ndcode_site.git]
/
api
/
sign_up.js.min
1
/*let*/ sign_up = async (
2
email,
3
verification_code,
4
given_names,
5
family_name,
6
password,
7
contact_me
8
) => {
9
let response = await fetch(
10
'/api/sign_up.json',
11
{
12
method: 'POST',
13
body: JSON.stringify(
14
{
15
email,
16
verification_code,
17
given_names,
18
family_name,
19
password,
20
contact_me
21
}
22
)
23
}
24
)
25
if (!response.ok)
26
throw new Error((await response.json()).detail)
27
return /*await*/ response.json()
28
}