]> Untitled Git - lemmy.git/blobdiff - crates/api_crud/src/community/remove.rs
Make functions work with both connection and pool (#3420)
[lemmy.git] / crates / api_crud / src / community / remove.rs
index fd011c6c26bca78721eecd72b51fcdf73d685143..2bcd3d8572003795e5a18c4ff4f5ecd9a768ded4 100644 (file)
@@ -34,7 +34,7 @@ impl PerformCrud for RemoveCommunity {
     let community_id = data.community_id;
     let removed = data.removed;
     Community::update(
-      context.pool(),
+      &mut context.pool(),
       community_id,
       &CommunityUpdateForm::builder()
         .removed(Some(removed))
@@ -52,7 +52,7 @@ impl PerformCrud for RemoveCommunity {
       reason: data.reason.clone(),
       expires,
     };
-    ModRemoveCommunity::create(context.pool(), &form).await?;
+    ModRemoveCommunity::create(&mut context.pool(), &form).await?;
 
     build_community_response(context, local_user_view, community_id).await
   }