fix: temporarily don't set replies

we don't serve those routes yet
This commit is contained in:
əlemi 2024-04-29 21:02:41 +02:00
parent ee6120190d
commit 35804730de
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -49,16 +49,16 @@ pub async fn view(
.map(|x| x.ap()) .map(|x| x.ap())
.collect::<Vec<serde_json::Value>>(); .collect::<Vec<serde_json::Value>>();
let replies = // let replies =
serde_json::Value::new_object() // serde_json::Value::new_object()
.set_id(Some(&crate::url!(ctx, "/objects/{id}/replies"))) // .set_id(Some(&crate::url!(ctx, "/objects/{id}/replies")))
.set_collection_type(Some(apb::CollectionType::OrderedCollection)) // .set_collection_type(Some(apb::CollectionType::OrderedCollection))
.set_first(apb::Node::link(crate::url!(ctx, "/objects/{id}/replies/page"))) // .set_first(apb::Node::link(crate::url!(ctx, "/objects/{id}/replies/page")))
.set_total_items(Some(object.comments as u64)); // .set_total_items(Some(object.comments as u64));
Ok(JsonLD( Ok(JsonLD(
object.ap() object.ap()
.set_replies(apb::Node::object(replies)) // .set_replies(apb::Node::object(replies))
.set_attachment(apb::Node::array(attachments)) .set_attachment(apb::Node::array(attachments))
.ld_context() .ld_context()
)) ))