let expires = data.expires.map(naive_from_unix);
let person = Person::update(
- context.pool(),
+ &mut context.pool(),
banned_person_id,
&PersonUpdateForm::builder()
.banned(Some(ban))
if remove_data {
remove_user_data(
person.id,
- context.pool(),
+ &mut context.pool(),
context.settings(),
context.client(),
)
expires,
};
- ModBan::create(context.pool(), &form).await?;
+ ModBan::create(&mut context.pool(), &form).await?;
let person_id = data.person_id;
- let person_view = PersonView::read(context.pool(), person_id).await?;
+ let person_view = PersonView::read(&mut context.pool(), person_id).await?;
Ok(BanPersonResponse {
person_view,