X-Git-Url: http://these/git/?a=blobdiff_plain;f=crates%2Fapi%2Fsrc%2Flocal_user%2Fblock.rs;h=604219d4e0b6937e2c551e677be4df06e5cb3be7;hb=1d38aad9d3d51ef606074d5b49a8030c49dd0e9e;hp=67b1f521d42f6346bf0776383042cf6aaf5670f9;hpb=73492af4b09448684ffde3d55454434ec3ed490b;p=lemmy.git diff --git a/crates/api/src/local_user/block.rs b/crates/api/src/local_user/block.rs index 67b1f521..604219d4 100644 --- a/crates/api/src/local_user/block.rs +++ b/crates/api/src/local_user/block.rs @@ -34,18 +34,18 @@ impl Perform for BlockPerson { target_id, }; - let target_person_view = PersonView::read(context.pool(), target_id).await?; + let target_person_view = PersonView::read(&mut context.pool(), target_id).await?; if target_person_view.person.admin { return Err(LemmyErrorType::CantBlockAdmin)?; } if data.block { - PersonBlock::block(context.pool(), &person_block_form) + PersonBlock::block(&mut context.pool(), &person_block_form) .await .with_lemmy_type(LemmyErrorType::PersonBlockAlreadyExists)?; } else { - PersonBlock::unblock(context.pool(), &person_block_form) + PersonBlock::unblock(&mut context.pool(), &person_block_form) .await .with_lemmy_type(LemmyErrorType::PersonBlockAlreadyExists)?; }