]> Untitled Git - lemmy.git/blobdiff - crates/api_common/src/post.rs
Add support for Featured Posts (#2585)
[lemmy.git] / crates / api_common / src / post.rs
index c9d92380d5bee26c5da0b857d01e7469cf8c24e4..82a1d66499f037d82d998a8957a6363491a10219 100644 (file)
@@ -2,6 +2,7 @@ use crate::sensitive::Sensitive;
 use lemmy_db_schema::{
   newtypes::{CommentId, CommunityId, DbUrl, LanguageId, PostId, PostReportId},
   ListingType,
+  PostFeatureType,
   SortType,
 };
 use lemmy_db_views::structs::{PostReportView, PostView};
@@ -106,9 +107,10 @@ pub struct LockPost {
 }
 
 #[derive(Debug, Serialize, Deserialize, Clone, Default)]
-pub struct StickyPost {
+pub struct FeaturePost {
   pub post_id: PostId,
-  pub stickied: bool,
+  pub featured: bool,
+  pub feature_type: PostFeatureType,
   pub auth: Sensitive<String>,
 }
 
@@ -164,7 +166,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>,