) -> 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();
if !person.deleted {
let apub = person.into_json(&context).await?;
- Ok(create_apub_response(&apub))
+ create_apub_response(&apub)
} else {
- Ok(create_apub_tombstone_response(person.actor_id.clone()))
+ create_apub_tombstone_response(person.actor_id.clone())
}
}
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)?;
- Ok(create_apub_response(&outbox))
+ create_apub_response(&outbox)
}