This commit should have been Iota Auth...

This commit is contained in:
Alex Emmet 2026-01-04 22:37:08 +01:00
commit 9b949f8c6b
3 changed files with 53 additions and 11 deletions

View file

@ -77,7 +77,7 @@ async fn main() {
JsonValue::Number(Number::from(
SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.unwrap_or(Duration::from_millis(0))
.as_millis() as i64,
)),
);
@ -126,7 +126,7 @@ async fn main() {
let iface: NetworkInterface = iface;
if iface.ips.len() > 0 {
let ipsv = format!("{}", iface.ips[0]);
let ips: &str = ipsv.split('/').next().unwrap();
let ips: &str = ipsv.split('/').next().unwrap_or("");
if format!("{}", ips).starts_with("10.") || format!("{}", ips).starts_with("192.") {
ip = ips.to_string();
}