UI: treat existing concept as ok
This commit is contained in:
parent
feaa7cc830
commit
d3f4ad18aa
|
|
@ -280,6 +280,7 @@ static const char k_amduatd_ui_html[] =
|
||||||
"\n"
|
"\n"
|
||||||
" async function ensureConcept(name){\n"
|
" async function ensureConcept(name){\n"
|
||||||
" const resp = await fetch('/v1/concepts',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({name})});\n"
|
" const resp = await fetch('/v1/concepts',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({name})});\n"
|
||||||
|
" if(resp.status === 409) return; // already exists\n"
|
||||||
" if(!resp.ok) throw new Error(await resp.text());\n"
|
" if(!resp.ok) throw new Error(await resp.text());\n"
|
||||||
" }\n"
|
" }\n"
|
||||||
"\n"
|
"\n"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue