chore(doc): comment channel routes

This commit is contained in:
Paul Makles
2022-03-19 14:14:24 +00:00
parent 14e17b10c0
commit 25a52cbbb1
22 changed files with 229 additions and 42 deletions

View File

@@ -6,11 +6,19 @@ use revolt_quark::{
perms, Db, Error, Override, Permission, Ref, Result,
};
#[derive(Deserialize)]
/// # Permission Value
#[derive(Deserialize, JsonSchema)]
pub struct Data {
/// Allow / deny values to set for this role
permissions: Override,
}
/// # Set Role Permission
///
/// Sets permissions for the specified role in this channel.
///
/// Channel must be a `TextChannel` or `VoiceChannel`.
#[openapi(tag = "Channel Permissions")]
#[put("/<target>/permissions/<role_id>", data = "<data>", rank = 2)]
pub async fn req(
db: &Db,