From 32a5567cbffbc540e19dca61d370b9d078e37d30 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Thu, 11 May 2023 15:20:45 -0400 Subject: [PATCH] Fixing empty req issue. (#2849) * Fixing empty req issue. * Forgot skip serializing none. --- crates/api_common/src/person.rs | 5 ++++- crates/api_common/src/site.rs | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/crates/api_common/src/person.rs b/crates/api_common/src/person.rs index 857e52036..263fd584c 100644 --- a/crates/api_common/src/person.rs +++ b/crates/api_common/src/person.rs @@ -51,11 +51,14 @@ pub struct Register { pub answer: Option, } +#[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>, +} #[skip_serializing_none] #[derive(Debug, Serialize, Deserialize, Clone)] diff --git a/crates/api_common/src/site.rs b/crates/api_common/src/site.rs index e81186b10..2d3ebbe0b 100644 --- a/crates/api_common/src/site.rs +++ b/crates/api_common/src/site.rs @@ -304,11 +304,14 @@ pub struct GetSiteResponse { pub custom_emojis: Vec, } +#[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>, +} #[skip_serializing_none] #[derive(Debug, Serialize, Deserialize, Clone)]