From 3eefcad7674e014cf3b3d718abf86771025a2a14 Mon Sep 17 00:00:00 2001 From: core Date: Sat, 29 Jul 2023 18:12:36 -0400 Subject: [PATCH] code cleanup --- trifid-api/src/routes/v1/dnclient.rs | 2 +- trifid-api/src/routes/v1/hosts.rs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/trifid-api/src/routes/v1/dnclient.rs b/trifid-api/src/routes/v1/dnclient.rs index 62a6343..7e5a482 100644 --- a/trifid-api/src/routes/v1/dnclient.rs +++ b/trifid-api/src/routes/v1/dnclient.rs @@ -249,7 +249,7 @@ pub async fn dnclient( } }; - let mut ks = host_in_ks; + let ks = host_in_ks; ks.certs.push(KSCert { id: ks.current_cert + 1, diff --git a/trifid-api/src/routes/v1/hosts.rs b/trifid-api/src/routes/v1/hosts.rs index f611027..9a03600 100644 --- a/trifid-api/src/routes/v1/hosts.rs +++ b/trifid-api/src/routes/v1/hosts.rs @@ -77,7 +77,6 @@ use std::net::{Ipv4Addr, SocketAddrV4}; use std::str::FromStr; use std::time::{SystemTime, UNIX_EPOCH}; use trifid_api_entities::entity::{host, host_config_override, host_static_address, network, organization, role}; -use trifid_api_entities::entity::prelude::HostConfigOverride; #[derive(Serialize, Deserialize)] pub struct ListHostsRequestOpts { @@ -720,7 +719,7 @@ pub async fn create_hosts_request( } let matching_ip = match host::Entity::find() - .filter(host::Column::Ip.eq(&req.ip_address)) + .filter(host::Column::Ip.eq(&req.ip_address.to_string())) .all(&db.conn) .await {