aboutsummaryrefslogtreecommitdiffhomepage
path: root/assets/common
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2021-01-19 12:44:48 +0100
committerArthurHoaro <arthur@hoa.ro>2021-01-19 12:54:34 +0100
commit93175b6e9d5cfa4d4319bd58b9de01824d596288 (patch)
treea09a4d05273d5d615508cc469b8155f6fcebd4b7 /assets/common
parentffa39719a17982e6a6cac9bc3f758aa12fa69973 (diff)
downloadShaarli-93175b6e9d5cfa4d4319bd58b9de01824d596288.tar.gz
Shaarli-93175b6e9d5cfa4d4319bd58b9de01824d596288.tar.zst
Shaarli-93175b6e9d5cfa4d4319bd58b9de01824d596288.zip
Fix: bulk add - delete existing link
Do not send redirect response in bookmark delete controller if the request comes from bulk creation page. Fixes #1683
Diffstat (limited to 'assets/common')
-rw-r--r--assets/common/js/shaare-batch.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/assets/common/js/shaare-batch.js b/assets/common/js/shaare-batch.js
index 557325ee..2b438045 100644
--- a/assets/common/js/shaare-batch.js
+++ b/assets/common/js/shaare-batch.js
@@ -26,9 +26,9 @@ const sendBookmarkForm = (basePath, formElement) => {
26const sendBookmarkDelete = (buttonElement, formElement) => ( 26const sendBookmarkDelete = (buttonElement, formElement) => (
27 new Promise((resolve, reject) => { 27 new Promise((resolve, reject) => {
28 const xhr = new XMLHttpRequest(); 28 const xhr = new XMLHttpRequest();
29 xhr.open('GET', buttonElement.href); 29 xhr.open('GET', `${buttonElement.href}&source=batch`);
30 xhr.onload = () => { 30 xhr.onload = () => {
31 if (xhr.status !== 200) { 31 if (xhr.status !== 204) {
32 alert(`An error occurred. Return code: ${xhr.status}`); 32 alert(`An error occurred. Return code: ${xhr.status}`);
33 reject(); 33 reject();
34 } else { 34 } else {