Finished up with internet archive api utility.

This commit is contained in:
rainbow napkin 2025-01-12 16:39:03 -05:00
parent 4c1d3c9db5
commit b443840c29
9 changed files with 241 additions and 43 deletions

View file

@ -31,7 +31,7 @@ class canopyAdminUtils{
body: JSON.stringify({permissionsMap: Object.fromEntries(permMap)})
});
if(response.status == 200){
if(response.ok){
return await response.json();
}else{
utils.ux.displayResponseError(await response.json());
@ -49,7 +49,7 @@ class canopyAdminUtils{
body: JSON.stringify({channelPermissionsMap: Object.fromEntries(permMap)})
});
if(response.status == 200){
if(response.ok){
return await response.json();
}else{
utils.ux.displayResponseError(await response.json());
@ -67,7 +67,7 @@ class canopyAdminUtils{
body: JSON.stringify({user, rank})
});
if(response.status == 200){
if(response.ok){
return await response.json();
}else{
utils.ux.displayResponseError(await response.json());
@ -79,7 +79,7 @@ class canopyAdminUtils{
method: "GET"
});
if(response.status == 200){
if(response.ok){
return await response.json();
}else{
utils.ux.displayResponseError(await response.json());
@ -97,7 +97,7 @@ class canopyAdminUtils{
body: JSON.stringify({user, permanent, ipBan, expirationDays})
});
if(response.status == 200){
if(response.ok){
return await response.json();
}else{
utils.ux.displayResponseError(await response.json());
@ -115,7 +115,7 @@ class canopyAdminUtils{
body: JSON.stringify({user})
});
if(response.status == 200){
if(response.ok){
return await response.json();
}else{
utils.ux.displayResponseError(await response.json());
@ -127,7 +127,7 @@ class canopyAdminUtils{
method: "GET"
});
if(response.status == 200){
if(response.ok){
return await response.json();
}else{
utils.ux.displayResponseError(await response.json());
@ -145,7 +145,7 @@ class canopyAdminUtils{
body: JSON.stringify({command})
});
if(response.status == 200){
if(response.ok){
return await response.json();
}else{
utils.ux.displayResponseError(await response.json());
@ -163,7 +163,7 @@ class canopyAdminUtils{
body: JSON.stringify({command})
});
if(response.status == 200){
if(response.ok){
return await response.json();
}else{
utils.ux.displayResponseError(await response.json());
@ -175,7 +175,7 @@ class canopyAdminUtils{
method: "GET"
});
if(response.status == 200){
if(response.ok){
return await response.json();
}else{
utils.ux.displayResponseError(await response.json());
@ -193,7 +193,7 @@ class canopyAdminUtils{
body: JSON.stringify({name, link})
});
if(response.status == 200){
if(response.ok){
return await response.json();
}else{
utils.ux.displayResponseError(await response.json());
@ -211,7 +211,7 @@ class canopyAdminUtils{
body: JSON.stringify({name})
});
if(response.status == 200){
if(response.ok){
return await response.json();
}else{
utils.ux.displayResponseError(await response.json());
@ -229,7 +229,7 @@ class canopyAdminUtils{
body: JSON.stringify({user})
});
if(response.status == 200){
if(response.ok){
return await response.json();
}else{
utils.ux.displayResponseError(await response.json());