Fix: bulk add - delete existing link

Do not send redirect response in bookmark delete controller if the request comes from bulk creation page.

Fixes 
This commit is contained in:
ArthurHoaro 2021-01-19 12:44:48 +01:00
parent ffa39719a1
commit 93175b6e9d
3 changed files with 50 additions and 3 deletions
assets/common/js

View 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 {