Finished up with channel rank/perms frontend.
This commit is contained in:
parent
edb4215929
commit
796bb033a7
22 changed files with 472 additions and 57 deletions
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue