parent
96b7afc0b1
commit
6a6c915014
1 changed files with 3 additions and 2 deletions
|
@ -9,6 +9,7 @@ use lemmy_utils::{
|
||||||
VERSION,
|
VERSION,
|
||||||
};
|
};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
use std::collections::HashMap;
|
||||||
use url::Url;
|
use url::Url;
|
||||||
|
|
||||||
pub fn config(cfg: &mut web::ServiceConfig) {
|
pub fn config(cfg: &mut web::ServiceConfig) {
|
||||||
|
@ -71,7 +72,7 @@ async fn node_info(context: web::Data<LemmyContext>) -> Result<HttpResponse, Err
|
||||||
inbound: Some(vec![]),
|
inbound: Some(vec![]),
|
||||||
outbound: Some(vec![]),
|
outbound: Some(vec![]),
|
||||||
}),
|
}),
|
||||||
metadata: Some(vec![]),
|
metadata: Some(HashMap::new()),
|
||||||
};
|
};
|
||||||
|
|
||||||
Ok(HttpResponse::Ok().json(json))
|
Ok(HttpResponse::Ok().json(json))
|
||||||
|
@ -99,7 +100,7 @@ pub struct NodeInfo {
|
||||||
pub open_registrations: Option<bool>,
|
pub open_registrations: Option<bool>,
|
||||||
/// These fields are required by the spec for no reason
|
/// These fields are required by the spec for no reason
|
||||||
pub services: Option<NodeInfoServices>,
|
pub services: Option<NodeInfoServices>,
|
||||||
pub metadata: Option<Vec<String>>,
|
pub metadata: Option<HashMap<String, String>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize, Debug, Default)]
|
#[derive(Serialize, Deserialize, Debug, Default)]
|
||||||
|
|
Loading…
Reference in a new issue