]> Untitled Git - lemmy.git/blobdiff - crates/api_common/src/post.rs
Diesel 2.0.0 upgrade (#2452)
[lemmy.git] / crates / api_common / src / post.rs
index 4884c15dae60c6707e45c89733ea9b6070b75ee0..4f486e0598da8ead2abc90eddd4122a72707a816 100644 (file)
@@ -1,6 +1,6 @@
 use crate::sensitive::Sensitive;
 use lemmy_db_schema::{
-  newtypes::{CommentId, CommunityId, DbUrl, PostId, PostReportId},
+  newtypes::{CommentId, CommunityId, DbUrl, LanguageId, PostId, PostReportId},
   ListingType,
   SortType,
 };
@@ -17,6 +17,7 @@ pub struct CreatePost {
   pub body: Option<String>,
   pub honeypot: Option<String>,
   pub nsfw: Option<bool>,
+  pub language_id: Option<LanguageId>,
   pub auth: Sensitive<String>,
 }
 
@@ -71,6 +72,7 @@ pub struct EditPost {
   pub url: Option<Url>,
   pub body: Option<String>,
   pub nsfw: Option<bool>,
+  pub language_id: Option<LanguageId>,
   pub auth: Sensitive<String>,
 }
 
@@ -162,7 +164,7 @@ pub struct GetSiteMetadataResponse {
   pub metadata: SiteMetadata,
 }
 
-#[derive(Debug, Deserialize, Serialize, PartialEq, Clone)]
+#[derive(Debug, Deserialize, Serialize, PartialEq, Eq, Clone)]
 pub struct SiteMetadata {
   pub title: Option<String>,
   pub description: Option<String>,