Skip to content

Commit

Permalink
Format and fix spelling mistakes
Browse files Browse the repository at this point in the history
  • Loading branch information
ShayBox committed Apr 10, 2024
1 parent a855d35 commit cd8e54c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
19 changes: 9 additions & 10 deletions src/model/groups.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,34 +119,33 @@ pub struct GroupAuditLogDataChange<T> {

#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
#[serde(rename_all = "camelCase")]
/// Details about a group (un)ban.
/// Details about a group un-ban.
pub struct GroupBan {
/// Unique identifier of the (un)ban.
/// Unique identifier of the un-ban.
pub id: String,
/// Identifier of the group.
pub group_id: crate::id::Group,
/// Identifier of the user who was (un)banned.
/// Identifier of the user who was un-banned.
pub user_id: crate::id::User,
/// Flag indicating if the user was representing the group at the time of
/// (un)ban.
/// Flag indicating if the user was representing the group at the time of un-ban.
pub is_representing: bool,
/// List of role identifiers the user had in the group.
pub role_ids: Vec<Value>,
/// List of managed role identifiers the user had in the group.
pub m_role_ids: Vec<Value>,
/// Timestamp of when the user joined.
/// Time of when the user joined.
pub joined_at: Option<String>,
/// Status of the user's membership in the group at the time of (un)ban.
/// Status of the user's membership in the group at the time of un-ban.
pub membership_status: String,
/// Visibility status of the user in the group.
pub visibility: String,
/// Flag indicating if the user was subscribed to group announcements.
pub is_subscribed_to_announcements: bool,
/// Timestamp of the last post read by the user in the group.
/// Time of the last post read by the user in the group.
pub last_post_read_at: Option<Value>,
/// Timestamp when the user joined the group.
/// Time when the user joined the group.
pub created_at: String,
/// Timestamp when the user was (un)banned from the group.
/// Time when the user was un-banned from the group.
pub banned_at: Option<String>,
/// Notes added by the group manager regarding the ban.
pub manager_notes: String,
Expand Down
10 changes: 6 additions & 4 deletions src/query/groups.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,12 @@ impl Queryable<Authentication, crate::model::GroupBan> for GroupBan {
}
}

/// Unbans a user from a Group.
/// Un-bans a user from a Group.
#[derive(Debug, Clone, PartialEq, Eq, Hash, Deserialize, Serialize)]
pub struct GroupUnban {
/// The ID of the group
pub group_id: crate::id::Group,
/// The ID of the user to unban
/// The ID of the user to un-ban
pub user_id: crate::id::User,
}

Expand All @@ -103,7 +103,7 @@ impl Queryable<Authentication, crate::model::GroupBan> for GroupUnban {
}
}

/// Returns a LimitedGroup Member.
/// Returns a Limited Group Member.
#[derive(Debug, Clone, PartialEq, Eq, Hash, Deserialize, Serialize)]
pub struct GroupMember {
/// The ID of the group
Expand All @@ -112,7 +112,9 @@ pub struct GroupMember {
pub user_id: crate::id::User,
}

impl Queryable<Authentication, Option<crate::model::GroupMember>> for GroupMember {
impl Queryable<Authentication, Option<crate::model::GroupMember>>
for GroupMember
{
fn url(&self, _: &Authentication) -> String {
format!(
"{}/groups/{}/members/{}",
Expand Down
2 changes: 1 addition & 1 deletion src/query/users.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ impl Queryable<Authentication, crate::model::AnyUser> for User {
Clone, Debug, Default, Deserialize, Eq, Hash, PartialEq, Serialize,
)]
pub struct SearchUser {
/// Searches by displayName. Will return empty array if search query is empty
/// Searches by display name. Will return empty array if search query is empty
/// or missing.
pub search: String,
/// The number of objects to return.
Expand Down

0 comments on commit cd8e54c

Please sign in to comment.