Several improvements to chat pre/post processing
This commit is contained in:
parent
12922658b9
commit
b9283607d6
10 changed files with 217 additions and 71 deletions
|
|
@ -227,6 +227,23 @@ class canopyAdminUtils{
|
|||
utils.ux.displayResponseError(await response.json());
|
||||
}
|
||||
}
|
||||
|
||||
async addEmote(name, link){
|
||||
var response = await fetch(`/api/admin/emote`,{
|
||||
method: "POST",
|
||||
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, link})
|
||||
});
|
||||
|
||||
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