lg-admin: do not check res value

This commit is contained in:
Alexandre Iooss 2022-03-09 17:21:52 +01:00
parent 2447735aec
commit c20ad43758

View file

@ -54,14 +54,12 @@ class lgAdmin {
body: data,
credentials: 'same-origin',
}).then(res => {
if(res.ok) {
console.log("Deletion complete, response:", res);
// Remove HTML element
document.querySelectorAll(`[data-slide-name='${this.photoId}']`)[0].remove()
this.core.goToNextSlide();
this.core.refresh();
}
});
}
}
@ -79,7 +77,6 @@ class lgAdmin {
body: data,
credentials: 'same-origin',
}).then(res => {
if(res.ok) {
console.log("Report complete, response:", res);
// Update HTML element
@ -91,7 +88,6 @@ class lgAdmin {
} else {
location.reload();
}
}
});
}
}