- DbPerson::delete(conn, person.id).unwrap();
- Site::delete(conn, site.id).unwrap();
+ cleanup((person, site), &context).await;
+ }
+
+ async fn cleanup(data: (ApubPerson, ApubSite), context: &LemmyContext) {
+ DbPerson::delete(&mut context.pool(), data.0.id)
+ .await
+ .unwrap();
+ Site::delete(&mut context.pool(), data.1.id).await.unwrap();