Function wicrs_server::api::delete_channel [−][src]
pub async fn delete_channel(user_id: &str, hub_id: ID, channel_id: ID) -> Result
Expand description
Deletes a text channel in a hub.
Arguments
user_id
- ID of the user to check for permission to delete channels.hub_id
- ID of the hub that has the channel.channel_id
- ID of the channel to be deleted.
Errors
This function may return an error for any of the following reasons:
- THe user is not in the hub.
- The hub could not be loaded for any of the reasons outlined by
Hub::load
. - The hub could not be saved for any of the reasons outlined by
Hub::save
. - The user does not have permission to delete channels.
- The channel could not be deleted for any of the reasons outlined by
Hub::delete_channel
.