]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - assets/common/js/shaare-batch.js
Fix: bulk add - delete existing link
[github/shaarli/Shaarli.git] / assets / common / js / shaare-batch.js
index 557325ee373f9c85fc6287674f110096f379e7f1..2b438045c5f401ce8a21305278fcd57e8e083b86 100644 (file)
@@ -26,9 +26,9 @@ const sendBookmarkForm = (basePath, formElement) => {
 const sendBookmarkDelete = (buttonElement, formElement) => (
   new Promise((resolve, reject) => {
     const xhr = new XMLHttpRequest();
-    xhr.open('GET', buttonElement.href);
+    xhr.open('GET', `${buttonElement.href}&source=batch`);
     xhr.onload = () => {
-      if (xhr.status !== 200) {
+      if (xhr.status !== 204) {
         alert(`An error occurred. Return code: ${xhr.status}`);
         reject();
       } else {