]> Untitled Git - lemmy.git/blobdiff - crates/apub/src/http/person.rs
Make functions work with both connection and pool (#3420)
[lemmy.git] / crates / apub / src / http / person.rs
index 453905eeea872638982eecdda8bdad7826ed911c..16956ec4736ee0163f6d12eeef0030d77350c92a 100644 (file)
@@ -30,7 +30,7 @@ pub(crate) async fn get_apub_person_http(
 ) -> Result<HttpResponse, LemmyError> {
   let user_name = info.into_inner().user_name;
   // TODO: this needs to be able to read deleted persons, so that it can send tombstones
-  let person: ApubPerson = Person::read_from_name(context.pool(), &user_name, true)
+  let person: ApubPerson = Person::read_from_name(&mut context.pool(), &user_name, true)
     .await?
     .into();
 
@@ -60,7 +60,7 @@ pub(crate) async fn get_apub_person_outbox(
   info: web::Path<PersonQuery>,
   context: Data<LemmyContext>,
 ) -> Result<HttpResponse, LemmyError> {
-  let person = Person::read_from_name(context.pool(), &info.user_name, false).await?;
+  let person = Person::read_from_name(&mut context.pool(), &info.user_name, false).await?;
   let outbox_id = generate_outbox_url(&person.actor_id)?.into();
   let outbox = EmptyOutbox::new(outbox_id)?;
   create_apub_response(&outbox)