X-Git-Url: http://these/git/?a=blobdiff_plain;f=crates%2Fapi_crud%2Fsrc%2Fcommunity%2Fremove.rs;h=be486144f1bddd9fc935d9499a90acd8f6ed6803;hb=235cc8b22897bfb3e71ba3dbd725d36863fea8ba;hp=5895a6cbc7e69ae6a2a5f2293e8997614b3f9834;hpb=276a8c2bd3e4fd1323e66b808675cf14cf6f75c5;p=lemmy.git diff --git a/crates/api_crud/src/community/remove.rs b/crates/api_crud/src/community/remove.rs index 5895a6cb..be486144 100644 --- a/crates/api_crud/src/community/remove.rs +++ b/crates/api_crud/src/community/remove.rs @@ -7,7 +7,7 @@ use lemmy_api_common::{ use lemmy_apub::activities::deletion::{send_apub_delete_in_community, DeletableObjects}; use lemmy_db_schema::{ source::{ - community::Community, + community::{Community, CommunityUpdateForm}, moderator::{ModRemoveCommunity, ModRemoveCommunityForm}, }, traits::Crud, @@ -36,7 +36,13 @@ impl PerformCrud for RemoveCommunity { let community_id = data.community_id; let removed = data.removed; let updated_community = blocking(context.pool(), move |conn| { - Community::update_removed(conn, community_id, removed) + Community::update( + conn, + community_id, + &CommunityUpdateForm::builder() + .removed(Some(removed)) + .build(), + ) }) .await? .map_err(|e| LemmyError::from_error_message(e, "couldnt_update_community"))?;