From 7b9ca1a9bf4dc385f2f3fd3c2d755da7af51c5d1 Mon Sep 17 00:00:00 2001 From: akvlad <2798590+akvlad@users.noreply.github.com> Date: Wed, 6 Dec 2023 13:03:33 +0200 Subject: [PATCH] fix: res.status -> res.code (#403) --- lib/handlers/prom_query.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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, ' ')