From 699e519dc1d2018506cefae8a720f8261c4af8e3 Mon Sep 17 00:00:00 2001 From: Felix Stupp Date: Sat, 29 Dec 2018 18:52:22 +0100 Subject: [PATCH] ping: Fixed usage of SimpleQuery.filter --- routes/ping.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/ping.js b/routes/ping.js index dea80c2..54fffe4 100644 --- a/routes/ping.js +++ b/routes/ping.js @@ -9,7 +9,7 @@ router.use((req, res, next) => { }); router.get("/:fqdn", (req, res) => { - db.q.select(["ipv4", "ipv6"]).from("addresses").where("fqdn", req.params.fqdn).first((e, d) => { + db.q.select(["ipv4", "ipv6"]).from("addresses").filter("fqdn", req.params.fqdn).first((e, d) => { if (e) return res.status(400).send("Error"); if (!d) return res.status(404).send("Unknown FQDN"); res.send(d.ipv4 ? (d.ipv6 ? d.ipv4 + "\n" + d.ipv6 : d.ipv4) : (d.ipv6 ? d.ipv6 : ""));