Skip to content

Commit

Permalink
zone: make Owner have default values
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasqueirozb committed Jan 19, 2024
1 parent b4fa5ef commit f3bffd3
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions cloudflare/src/endpoints/zone.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,18 @@ pub enum Status {
#[derive(Deserialize, Debug)]
#[serde(rename_all = "lowercase", tag = "type")]
pub enum Owner {
User { id: String, email: String },
Organization { id: String, name: String },
User {
#[serde(default = "String::new")]
id: String,
#[serde(default = "String::new")]
email: String,
},
Organization {
#[serde(default = "String::new")]
id: String,
#[serde(default = "String::new")]
name: String,
},
}

#[derive(Serialize, Deserialize, Debug, Clone)]
Expand Down

0 comments on commit f3bffd3

Please sign in to comment.