]> Untitled Git - lemmy.git/blobdiff - crates/api/src/community/hide.rs
Make functions work with both connection and pool (#3420)
[lemmy.git] / crates / api / src / community / hide.rs
index ecc9d390d59001b212aef9b472f177f2729a97b7..313e3d84a5917b6a09c3887fc701d8a78cf184a3 100644 (file)
@@ -39,11 +39,11 @@ impl Perform for HideCommunity {
     };
 
     let community_id = data.community_id;
-    Community::update(context.pool(), community_id, &community_form)
+    Community::update(&mut context.pool(), community_id, &community_form)
       .await
       .with_lemmy_type(LemmyErrorType::CouldntUpdateCommunityHiddenStatus)?;
 
-    ModHideCommunity::create(context.pool(), &mod_hide_community_form).await?;
+    ModHideCommunity::create(&mut context.pool(), &mod_hide_community_form).await?;
 
     build_community_response(context, local_user_view, community_id).await
   }