diff --git a/lib/handlers/prom_query.js b/lib/handlers/prom_query.js index 59935bef..8b345555 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 (!isNaN(parseInt(req.query.query))) { - return res.status(200).send(exec(parseInt(req.query.query))) + return res.code(200).send(exec(parseInt(req.query.query))) } /* remove newlines */ req.query.query = req.query.query.replace(/\n/g, ' ')