mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-25 01:10:32 +00:00
parent
6ed2ddf76d
commit
55e383ae38
1 changed files with 3 additions and 2 deletions
|
@ -387,12 +387,13 @@ fn update_instance_software(conn: &mut PgConnection, user_agent: &str) -> LemmyR
|
||||||
Ok(res) => match res.json::<NodeInfo>() {
|
Ok(res) => match res.json::<NodeInfo>() {
|
||||||
Ok(node_info) => {
|
Ok(node_info) => {
|
||||||
// Instance sent valid nodeinfo, write it to db
|
// Instance sent valid nodeinfo, write it to db
|
||||||
|
let software = node_info.software.as_ref();
|
||||||
Some(
|
Some(
|
||||||
InstanceForm::builder()
|
InstanceForm::builder()
|
||||||
.domain(instance.domain)
|
.domain(instance.domain)
|
||||||
.updated(Some(naive_now()))
|
.updated(Some(naive_now()))
|
||||||
.software(node_info.software.and_then(|s| s.name))
|
.software(software.and_then(|s| s.name.clone()))
|
||||||
.version(node_info.version.clone())
|
.version(software.and_then(|s| s.version.clone()))
|
||||||
.build(),
|
.build(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue