33 lines
865 B
JavaScript
33 lines
865 B
JavaScript
let lines = [
|
|
];
|
|
|
|
lines.forEach(line => {
|
|
fetch("https://sketchersunited.org/channels/2/posts/" + line.split("/")[4], {
|
|
"credentials": "include",
|
|
"headers": {
|
|
"Accept": "application/json, text/plain, */*",
|
|
"X-CSRF-TOKEN": document.querySelector('meta[name="csrf-token"]').content,
|
|
"X-XSRF-TOKEN": document.cookie.split("XSRF-TOKEN=")[1],
|
|
"Sec-Fetch-Dest": "empty",
|
|
"Sec-Fetch-Mode": "cors",
|
|
"Sec-Fetch-Site": "same-origin"
|
|
},
|
|
"referrer": line,
|
|
"method": "DELETE",
|
|
"mode": "cors"
|
|
})
|
|
.then(response => {
|
|
if (response.ok) {
|
|
return response.json();
|
|
} else {
|
|
throw new Error('Network response was not ok.');
|
|
}
|
|
})
|
|
.then(data => {
|
|
console.log(data);
|
|
})
|
|
.catch(error => {
|
|
console.error('There was a problem with the fetch operation:', error);
|
|
});
|
|
});
|