1
0
Fork 0
forked from alemi/upub

chore: use pull_object

This commit is contained in:
əlemi 2024-05-27 19:53:39 +02:00
parent d830576e66
commit b36e9f5bf5
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -236,9 +236,7 @@ async fn fetch_object_inner(ctx: &Context, id: &str, depth: usize) -> crate::Res
return Ok(x); // already in db, easy return Ok(x); // already in db, easy
} }
let object = Context::request( let object = ctx.pull_object(id).await?;
Method::GET, id, None, &format!("https://{}", ctx.domain()), ctx.pkey(), ctx.domain(),
).await?.json::<serde_json::Value>().await?;
if let Some(oid) = object.id() { if let Some(oid) = object.id() {
if oid != id { if oid != id {