Skip to content

Commit

Permalink
Merge pull request #447 from metrico/fix_439
Browse files Browse the repository at this point in the history
fix: status() -> code() to support the bun wrapper
  • Loading branch information
akvlad authored Jan 29, 2024
2 parents 036a5aa + ab666f5 commit d4f7dcb
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 d4f7dcb

Please sign in to comment.