]> Untitled Git - lemmy.git/commitdiff
Fixing empty req issue. (#2849)
authorDessalines <dessalines@users.noreply.github.com>
Thu, 11 May 2023 19:20:45 +0000 (15:20 -0400)
committerGitHub <noreply@github.com>
Thu, 11 May 2023 19:20:45 +0000 (21:20 +0200)
* Fixing empty req issue.

* Forgot skip serializing none.

crates/api_common/src/person.rs
crates/api_common/src/site.rs

index 857e520369d35ca65b320516cea515904e4449d7..263fd584ceaa9f4a956747a51b4bfa7b7442aaec 100644 (file)
@@ -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)]
index e81186b105ee7f2675443d4cc57e0606e2857bee..2d3ebbe0b0d1a74ec7020824c1c81c2da7191ff8 100644 (file)
@@ -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)]