]> Untitled Git - lemmy.git/blobdiff - crates/api_common/src/community.rs
Add pending, and change use specific API response for FollowCommunity. Fixes #2246
[lemmy.git] / crates / api_common / src / community.rs
index 90c86f1c2d3c2671cf112c26e8e941ff13e890da..a4b5e2e6f9b6bf55f3ceb6bbefa5526de050f2b9 100644 (file)
@@ -5,7 +5,12 @@ use lemmy_db_schema::{
   ListingType,
   SortType,
 };
-use lemmy_db_views_actor::structs::{CommunityModeratorView, CommunityView, PersonViewSafe};
+use lemmy_db_views_actor::structs::{
+  CommunityFollowerView,
+  CommunityModeratorView,
+  CommunityView,
+  PersonViewSafe,
+};
 use serde::{Deserialize, Serialize};
 
 #[derive(Debug, Serialize, Deserialize, Clone, Default)]
@@ -41,6 +46,11 @@ pub struct CommunityResponse {
   pub community_view: CommunityView,
 }
 
+#[derive(Debug, Serialize, Deserialize, Clone)]
+pub struct FollowCommunityResponse {
+  pub community_follower_view: CommunityFollowerView,
+}
+
 #[derive(Debug, Serialize, Deserialize, Clone, Default)]
 pub struct ListCommunities {
   pub type_: Option<ListingType>,