Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/models/update_metadata_request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ pub struct UpdateMetadataRequest {
pub properties: Option<HashMap<String, Value>>,
#[serde(rename = "update_password_required", skip_serializing_if = "Option::is_none")]
pub update_password_required: Option<bool>,
#[serde(rename = "legacy_user_id", skip_serializing_if = "Option::is_none")]
pub legacy_user_id: Option<String>,
}

impl UpdateMetadataRequest {
Expand All @@ -43,6 +45,7 @@ impl UpdateMetadataRequest {
metadata: None,
properties: None,
update_password_required: None,
legacy_user_id: None,
}
}
}
Expand Down
10 changes: 6 additions & 4 deletions src/models/update_org_request.rs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we don't actually need Deserialize on UpdateOrgRequest

Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@ pub struct UpdateOrgRequest {
pub restrict_to_domain: Option<bool>,
#[serde(rename = "legacy_org_id", skip_serializing_if = "Option::is_none")]
pub legacy_org_id: Option<String>,
// TODO: This should be added once supported in the FE.
// #[serde(rename = "require_2fa_by", skip_serializing_if = "Option::is_none")]
// pub require_2fa_by: Option<chrono::DateTime<chrono::Utc>>,
#[serde(rename = "require_2fa_by", skip_serializing_if = "Option::is_none")]
pub require_2fa_by: Option<String>,
#[serde(rename = "extra_domains", skip_serializing_if = "Option::is_none")]
pub extra_domains: Option<Vec<String>>,
}

impl UpdateOrgRequest {
Expand All @@ -46,7 +47,8 @@ impl UpdateOrgRequest {
autojoin_by_domain: None,
restrict_to_domain: None,
legacy_org_id: None,
// require_2fa_by: None,
require_2fa_by: None,
extra_domains: None,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, a correction on this one...
we should instead define extra_domains as

#[serde(rename = "extra_domains", skip_serializing_if = "Option::is_none")]
pub extra_domains: Option<Vec<String>>,

to distinguish between the cases where there's no change vs setting to an empty array. Then this line stays

extra_domains: None,

}
}
}
Loading