Skip to content

Commit

Permalink
fix: res.status -> res.code (#403)
Browse files Browse the repository at this point in the history
  • Loading branch information
akvlad authored Dec 6, 2023
1 parent 669d6a0 commit 7b9ca1a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/handlers/prom_query.js
Original file line number Diff line number Diff line change
Expand Up @@ -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, ' ')
Expand Down

0 comments on commit 7b9ca1a

Please sign in to comment.