Added error output

master
Felix Stupp 6 years ago
parent fd01aca6c1
commit e9a2801441

@ -20,7 +20,7 @@ function userReq(req, res) {
if (p.host) q.filter("host", p.host);
if (p.type) q.filter("type", p.type);
q.list((e, d) => {
if (e) return res.status(500).send("ERROR");
if (e) return res.status(500).render('error', {message: e.message, error: e});
res.type("text/plain");
res.send(d.reduce(toList));
})

Loading…
Cancel
Save