X-Git-Url: http://these/git/?a=blobdiff_plain;f=crates%2Fapi%2Fsrc%2Fsite%2Fpurge%2Fcommunity.rs;h=56e757176b5bb65c8bfdf1b86b4897ef801dfce0;hb=1d38aad9d3d51ef606074d5b49a8030c49dd0e9e;hp=50482b73abd055b475de82a9b38f388a077d8625;hpb=73492af4b09448684ffde3d55454434ec3ed490b;p=lemmy.git diff --git a/crates/api/src/site/purge/community.rs b/crates/api/src/site/purge/community.rs index 50482b73..56e75717 100644 --- a/crates/api/src/site/purge/community.rs +++ b/crates/api/src/site/purge/community.rs @@ -30,7 +30,7 @@ impl Perform for PurgeCommunity { let community_id = data.community_id; // Read the community to get its images - let community = Community::read(context.pool(), community_id).await?; + let community = Community::read(&mut context.pool(), community_id).await?; if let Some(banner) = community.banner { purge_image_from_pictrs(context.client(), context.settings(), &banner) @@ -46,13 +46,13 @@ impl Perform for PurgeCommunity { purge_image_posts_for_community( community_id, - context.pool(), + &mut context.pool(), context.settings(), context.client(), ) .await?; - Community::delete(context.pool(), community_id).await?; + Community::delete(&mut context.pool(), community_id).await?; // Mod tables let reason = data.reason.clone(); @@ -61,7 +61,7 @@ impl Perform for PurgeCommunity { reason, }; - AdminPurgeCommunity::create(context.pool(), &form).await?; + AdminPurgeCommunity::create(&mut context.pool(), &form).await?; Ok(PurgeItemResponse { success: true }) }