Upload files to "/"
This commit is contained in:
parent
9575f68b4f
commit
8b5a6589c9
|
@ -0,0 +1,32 @@
|
|||
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);
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue