summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/routes/v1/records.rs7
-rw-r--r--src/routes/v1/zones.rs4
2 files changed, 7 insertions, 4 deletions
diff --git a/src/routes/v1/records.rs b/src/routes/v1/records.rs
index f8dcc9a..83e8286 100644
--- a/src/routes/v1/records.rs
+++ b/src/routes/v1/records.rs
@@ -36,7 +36,12 @@ pub async fn get_records(
);
}
- let records = db::records::get_records(&pool, &zone.id).await.unwrap();
+ let records: Vec<db::models::Record> = db::records::get_records(&pool, &zone.id)
+ .await
+ .unwrap()
+ .into_iter()
+ .filter(|r| r.record_type != "SOA" && r.record_type != "NS")
+ .collect();
(StatusCode::OK, Json(json!(records)))
}
diff --git a/src/routes/v1/zones.rs b/src/routes/v1/zones.rs
index 7835911..8a554e5 100644
--- a/src/routes/v1/zones.rs
+++ b/src/routes/v1/zones.rs
@@ -16,9 +16,7 @@ use whois_rust::{WhoIs, WhoIsLookupOptions};
lazy_static! {
static ref NAMESERVERS: Vec<String> = Vec::from([
String::from("ns1.hostsdottxt.net."),
- String::from("ns2.hostsdottxt.net."),
- String::from("ns3.hostsdottxt.net."),
- String::from("ns4.hostsdottxt.net.")
+ String::from("ns2.hostsdottxt.net.")
]);
}