Function wicrs_server::api::change_hub_description [−][src]
pub async fn change_hub_description<S: Into<String> + Clone>(
user_id: &str,
hub_id: ID,
new_description: S
) -> Result<String>
Expand description
Changes the description of a hub.
Arguments
user_id
- ID of the user to check for permission to perform the operation.hub_id
- The ID of the hub whose name is to be changed.new_description
- The content for the hub’s description
Errors
This function may return an error for any of the following reasons:
- THe user is not in the hub.
- The user does not have permission to change the hub’s description.
- The given description is bigger than
crate::MAX_DESCRIPTION_SIZE
. - 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
.