Added section in channel settings to update description and thumbnail.
This commit is contained in:
parent
4001ad2f13
commit
370a08cb03
8 changed files with 271 additions and 17 deletions
|
|
@ -690,7 +690,7 @@ class canopyAjaxUtils{
|
|||
|
||||
constructor(){
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//Account
|
||||
async register(user, pass, passConfirm, email, verification){
|
||||
|
|
@ -872,6 +872,40 @@ class canopyAjaxUtils{
|
|||
}
|
||||
}
|
||||
|
||||
async setChannelThumbnail(chanName, thumbnail){
|
||||
var response = await fetch(`/api/channel/thumbnail`,{
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"x-csrf-token": utils.ajax.getCSRFToken()
|
||||
},
|
||||
body: JSON.stringify({chanName, thumbnail})
|
||||
});
|
||||
|
||||
if(response.ok){
|
||||
return await response.json();
|
||||
}else{
|
||||
utils.ux.displayResponseError(await response.json());
|
||||
}
|
||||
}
|
||||
|
||||
async setChannelDescription(chanName, description){
|
||||
var response = await fetch(`/api/channel/description`,{
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"x-csrf-token": utils.ajax.getCSRFToken()
|
||||
},
|
||||
body: JSON.stringify({chanName, description})
|
||||
});
|
||||
|
||||
if(response.ok){
|
||||
return await response.json();
|
||||
}else{
|
||||
utils.ux.displayResponseError(await response.json());
|
||||
}
|
||||
}
|
||||
|
||||
async setChannelSetting(chanName, settingsMap){
|
||||
var response = await fetch(`/api/channel/settings`,{
|
||||
method: "POST",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue