why wont this stil work
This commit is contained in:
parent
1ce94d25b1
commit
4da0fc0f59
1 changed files with 7 additions and 1 deletions
|
@ -24,11 +24,17 @@ async function unfollowUser(user) {
|
||||||
the = the.username;
|
the = the.username;
|
||||||
e = await fetch(`https://scratch.mit.edu/site-api/users/followers/${the}/remove/?usernames=${user}`, {
|
e = await fetch(`https://scratch.mit.edu/site-api/users/followers/${the}/remove/?usernames=${user}`, {
|
||||||
"method": "PUT",
|
"method": "PUT",
|
||||||
|
"body": "{}",
|
||||||
"headers": {
|
"headers": {
|
||||||
"x-csrftoken": getCookie('scratchcsrftoken')
|
"x-csrftoken": getCookie('scratchcsrftoken')
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
e = await e.json();
|
e = await e.text();
|
||||||
|
try {
|
||||||
|
e = JSON.parse(e);
|
||||||
|
} catch (err) {
|
||||||
|
e = {};
|
||||||
|
}
|
||||||
console.log(e);
|
console.log(e);
|
||||||
if (e.success) {
|
if (e.success) {
|
||||||
gek++;
|
gek++;
|
||||||
|
|
Loading…
Reference in a new issue