Skip to content

Commit

Permalink
rename to selected_collections
Browse files Browse the repository at this point in the history
  • Loading branch information
stefan0xC committed Dec 21, 2024
1 parent 6578725 commit 95fc4dd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/api/core/organizations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2352,7 +2352,7 @@ struct GroupRequest {
#[serde(default)]
access_all: bool,
external_id: Option<String>,
collections: Vec<CollectionSelection>,
collections: Vec<SelectedCollection>,
users: Vec<MembershipId>,
}

Expand All @@ -2373,13 +2373,13 @@ impl GroupRequest {

#[derive(Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
struct CollectionSelection {
struct SelectedCollection {
id: CollectionId,
read_only: bool,
hide_passwords: bool,
}

impl CollectionSelection {
impl SelectedCollection {
pub fn to_collection_group(&self, groups_uuid: GroupId) -> CollectionGroup {
CollectionGroup::new(self.id.clone(), groups_uuid, self.read_only, self.hide_passwords)
}
Expand Down Expand Up @@ -2462,7 +2462,7 @@ async fn put_group(

async fn add_update_group(
mut group: Group,
collections: Vec<CollectionSelection>,
collections: Vec<SelectedCollection>,
members: Vec<MembershipId>,
org_id: OrganizationId,
headers: &AdminHeaders,
Expand Down

0 comments on commit 95fc4dd

Please sign in to comment.