ping: Minimized response on update request

master
Felix Stupp 6 years ago
parent 810803c7b2
commit 2b52a7f1df
Signed by: zocker
GPG Key ID: 93E1BD26F6B02FB7

@ -35,7 +35,7 @@ router.get("/:fqdn/:code", (req, res) => {
if (!["ipv4", "ipv6"].includes(addr.kind())) return res.status(400).send("Invalid ip address"); if (!["ipv4", "ipv6"].includes(addr.kind())) return res.status(400).send("Invalid ip address");
db.query("UPDATE addresses SET " + addr.kind() + " = ? WHERE fqdn = ? AND code = ?", [addr.toString(), req.params.fqdn, req.params.code], (e, d) => { db.query("UPDATE addresses SET " + addr.kind() + " = ? WHERE fqdn = ? AND code = ?", [addr.toString(), req.params.fqdn, req.params.code], (e, d) => {
if (e) return res.status(400).send("Error"); if (e) return res.status(400).send("Error");
res.send(d); res.send(addr.toString());
}); });
}); });

Loading…
Cancel
Save