Skip to content

Commit

Permalink
Fixing empty req issue. (#2849)
Browse files Browse the repository at this point in the history
* Fixing empty req issue.

* Forgot skip serializing none.
  • Loading branch information
dessalines authored May 11, 2023
1 parent d63b1ba commit 32a5567
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion crates/api_common/src/person.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,14 @@ pub struct Register {
pub answer: Option<String>,
}

#[skip_serializing_none]
#[derive(Debug, Serialize, Deserialize, Clone, Default)]
#[cfg_attr(feature = "full", derive(TS))]
#[cfg_attr(feature = "full", ts(export))]
/// Fetches a Captcha item.
pub struct GetCaptcha {}
pub struct GetCaptcha {
pub auth: Option<Sensitive<String>>,
}

#[skip_serializing_none]
#[derive(Debug, Serialize, Deserialize, Clone)]
Expand Down
5 changes: 4 additions & 1 deletion crates/api_common/src/site.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,11 +304,14 @@ pub struct GetSiteResponse {
pub custom_emojis: Vec<CustomEmojiView>,
}

#[skip_serializing_none]
#[derive(Debug, Serialize, Deserialize, Clone)]
#[cfg_attr(feature = "full", derive(TS))]
#[cfg_attr(feature = "full", ts(export))]
/// Fetches the federated instances for your site.
pub struct GetFederatedInstances {}
pub struct GetFederatedInstances {
pub auth: Option<Sensitive<String>>,
}

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

0 comments on commit 32a5567

Please sign in to comment.