impl PersonBlock {
pub async fn read(
- pool: &DbPool,
+ pool: &mut DbPool<'_>,
for_person_id: PersonId,
for_recipient_id: PersonId,
) -> Result<Self, Error> {
#[async_trait]
impl Blockable for PersonBlock {
type Form = PersonBlockForm;
- async fn block(pool: &DbPool, person_block_form: &PersonBlockForm) -> Result<Self, Error> {
+ async fn block(
+ pool: &mut DbPool<'_>,
+ person_block_form: &PersonBlockForm,
+ ) -> Result<Self, Error> {
let conn = &mut get_conn(pool).await?;
insert_into(person_block)
.values(person_block_form)
.get_result::<Self>(conn)
.await
}
- async fn unblock(pool: &DbPool, person_block_form: &Self::Form) -> Result<usize, Error> {
+ async fn unblock(pool: &mut DbPool<'_>, person_block_form: &Self::Form) -> Result<usize, Error> {
let conn = &mut get_conn(pool).await?;
diesel::delete(
person_block