let added = data.added;
let added_person_id = data.person_id;
let added_admin = Person::update(
- context.pool(),
+ &mut context.pool(),
added_person_id,
&PersonUpdateForm::builder().admin(Some(added)).build(),
)
removed: Some(!data.added),
};
- ModAdd::create(context.pool(), &form).await?;
+ ModAdd::create(&mut context.pool(), &form).await?;
- let admins = PersonView::admins(context.pool()).await?;
+ let admins = PersonView::admins(&mut context.pool()).await?;
Ok(AddAdminResponse { admins })
}