]> Untitled Git - lemmy.git/blobdiff - crates/api/src/community/block.rs
Making community_follower.pending column not null.
[lemmy.git] / crates / api / src / community / block.rs
index 02ece47f5f3a93e25f668bf9f2cd20b934bde4f1..a8672e3e2172a52a2090734218ca51d7f23fc97e 100644 (file)
@@ -1,9 +1,8 @@
 use crate::Perform;
 use actix_web::web::Data;
 use lemmy_api_common::{
-  blocking,
   community::{BlockCommunity, BlockCommunityResponse},
-  get_local_user_view_from_jwt,
+  utils::{blocking, get_local_user_view_from_jwt},
 };
 use lemmy_apub::protocol::activities::following::undo_follow::UndoFollowCommunity;
 use lemmy_db_schema::{
@@ -13,7 +12,7 @@ use lemmy_db_schema::{
   },
   traits::{Blockable, Crud, Followable},
 };
-use lemmy_db_views_actor::community_view::CommunityView;
+use lemmy_db_views_actor::structs::CommunityView;
 use lemmy_utils::{ConnectionId, LemmyError};
 use lemmy_websocket::LemmyContext;
 
@@ -48,7 +47,7 @@ impl Perform for BlockCommunity {
       let community_follower_form = CommunityFollowerForm {
         community_id: data.community_id,
         person_id,
-        pending: false,
+        pending: Some(false),
       };
       blocking(context.pool(), move |conn: &'_ _| {
         CommunityFollower::unfollow(conn, &community_follower_form)