let banned_person_id = data.person_id;
let expires = data.expires.map(naive_from_unix);
- let ban_person = move |conn: &'_ _| Person::ban_person(conn, banned_person_id, ban, expires);
+ let ban_person = move |conn: &mut _| Person::ban_person(conn, banned_person_id, ban, expires);
let person = blocking(context.pool(), ban_person)
.await?
.map_err(|e| LemmyError::from_error_message(e, "couldnt_update_user"))?;
// Remove their data if that's desired
let remove_data = data.remove_data.unwrap_or(false);
if remove_data {
- remove_user_data(person.id, context.pool()).await?;
+ remove_user_data(
+ person.id,
+ context.pool(),
+ context.settings(),
+ context.client(),
+ )
+ .await?;
}
// Mod tables