Added Endpoints and AJAX Helper Functions for emote management, as well as imporvements to link embedding.
This commit is contained in:
parent
b9283607d6
commit
255e6e0d7f
7 changed files with 63 additions and 27 deletions
|
|
@ -244,6 +244,23 @@ class canopyAdminUtils{
|
|||
utils.ux.displayResponseError(await response.json());
|
||||
}
|
||||
}
|
||||
|
||||
async deleteEmote(name){
|
||||
var response = await fetch(`/api/admin/emote`,{
|
||||
method: "DELETE",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
//Unfortunately JSON doesn't natively handle ES6 maps, and god forbid someone update the standard in a way that's backwards compatible...
|
||||
body: JSON.stringify({name})
|
||||
});
|
||||
|
||||
if(response.status == 200){
|
||||
return await response.json();
|
||||
}else{
|
||||
utils.ux.displayResponseError(await response.json());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class adminUserList{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue