Finished up with channel rank/perms frontend.

This commit is contained in:
rainbow napkin 2024-11-27 02:16:54 -05:00
parent edb4215929
commit 796bb033a7
22 changed files with 472 additions and 57 deletions

View file

@ -187,6 +187,18 @@ class canopyAjaxUtils{
}
}
async getRankEnum(){
var response = await fetch(`/api/account/rankEnum`,{
method: "GET"
});
if(response.status == 200){
return (await response.json())
}else{
utils.ux.displayResponseError(await response.json());
}
}
async deleteAccount(pass){
const response = await fetch(`/api/account/delete`,{
method: "POST",
@ -253,6 +265,18 @@ class canopyAjaxUtils{
}
}
async getChannelRank(channel){
var response = await fetch(`/api/channel/rank?chanName=${channel}`,{
method: "GET"
});
if(response.status == 200){
return (await response.json())
}else{
utils.ux.displayResponseError(await response.json());
}
}
async setChannelRank(chanName, user, rank){
var response = await fetch(`/api/channel/rank`,{
method: "POST",