public
/
ndcode_site.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Move *.jst from / to /_lib to keep things tidy, implement /_lib/Problem.jst and ...
[ndcode_site.git]
/
js
/
api_call.js.min
1
api_call = async (endpoint, ...arguments) => {
2
let response = await fetch(
3
endpoint,
4
{
5
method: 'POST',
6
body: JSON.stringify(arguments)
7
}
8
)
9
if (!response.ok)
10
throw new Error((await response.json()).detail)
11
return /*await*/ response.json()
12
}