Function wicrs_server::api::change_user_status [−][src]
pub async fn change_user_status<S: Into<String> + Clone>(
user_id: &ID,
new_status: S
) -> Result<String>
Changes a user’s status. Returns the user’s previous status if successful.
Arguments
user
- User whose name is to be changed.new_status
- New status for the user.
Errors
This function may return an error for any of the following reasons.
- The modified user data could not be saved for any of the reasons outlined in
User::save
. - The new status was bigger than
crate::MAX_STATUS_SIZE
.