context: web::Data<LemmyContext>,
) -> Result<HttpResponse<Body>, LemmyError> {
let node_info = NodeInfoWellKnown {
- links: NodeInfoWellKnownLinks {
+ links: vec![NodeInfoWellKnownLinks {
rel: Url::parse("http://nodeinfo.diaspora.software/ns/schema/2.0")?,
href: Url::parse(&format!(
"{}/nodeinfo/2.0.json",
&context.settings().get_protocol_and_hostname(),
))?,
- },
+ }],
};
Ok(HttpResponse::Ok().json(node_info))
}
#[derive(Serialize, Deserialize, Debug)]
struct NodeInfoWellKnown {
- pub links: NodeInfoWellKnownLinks,
+ pub links: Vec<NodeInfoWellKnownLinks>,
}
#[derive(Serialize, Deserialize, Debug)]