Skip to content

Commit

Permalink
fix: status() -> code() to support the bun wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
akvlad committed Jan 29, 2024
1 parent 036a5aa commit ab666f5
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 (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, ' ')
Expand Down

0 comments on commit ab666f5

Please sign in to comment.