code cleanup
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
|
||||
|
||||
async function loadDoc(){
|
||||
const url = api(`document/${id}`;
|
||||
const url = api(`document/${id}`);
|
||||
const resp = await fetch(url,{credentials:'include'});
|
||||
if (resp.ok){
|
||||
doc = await resp.json();
|
||||
@@ -61,7 +61,7 @@
|
||||
data[parts.pop()] = inner;
|
||||
}
|
||||
try {
|
||||
const url = api(`document/${doc.id}`;
|
||||
const url = api(`document/${doc.id}`);
|
||||
const resp = await fetch(url,{
|
||||
credentials : 'include',
|
||||
method : 'PATCH',
|
||||
@@ -74,7 +74,7 @@
|
||||
}
|
||||
|
||||
async function addPosition(selected){
|
||||
const url = api(`document/${doc.id}/position`;
|
||||
const url = api(`document/${doc.id}/position`);
|
||||
const resp = await fetch(url,{
|
||||
method : 'POST',
|
||||
credentials : 'include',
|
||||
@@ -91,7 +91,7 @@
|
||||
async function render(ev){
|
||||
pdfDisabled = true;
|
||||
|
||||
const url = api(`document/${doc.id}/pdf`;
|
||||
const url = api(`document/${doc.id}/pdf`);
|
||||
const resp = await fetch(url,{credentials:'include'});
|
||||
if (resp.ok){
|
||||
error = null;
|
||||
|
||||
Reference in New Issue
Block a user