diff --git a/lib/handlers/prom_query.js b/lib/handlers/prom_query.js index 36dbb975..fa03d8b6 100644 --- a/lib/handlers/prom_query.js +++ b/lib/handlers/prom_query.js @@ -22,9 +22,9 @@ async function handler (req, res) { return res.send(resp) } if (req.query.query === '1+1') { - return res.status(200).send(test()) + return res.code(200).send(test()) } else if (Number(req.query.query)) { - return res.status(200).send(exec(Number(req.query.query))) + return res.code(200).send(exec(Number(req.query.query))) } /* remove newlines */ req.query.query = req.query.query.replace(/\n/g, ' ')