refactor: change errorServiceUnavailable function signature to avoid parameter passing error

Signed-off-by: BoHong Li <raccoon@hackmd.io>
This commit is contained in:
BoHong Li 2020-02-26 11:26:56 +08:00
parent 13ed2e6b44
commit da3fd00577
No known key found for this signature in database
GPG Key ID: 06770355DC9ECD38
2 changed files with 2 additions and 2 deletions

View File

@ -9,7 +9,7 @@ toobusy.maxLag(config.responseMaxLag)
module.exports = function (req, res, next) { module.exports = function (req, res, next) {
if (toobusy()) { if (toobusy()) {
response.errorServiceUnavailable(res) response.errorServiceUnavailable(req, res)
} else { } else {
next() next()
} }

View File

@ -53,7 +53,7 @@ function errorInternalError (req, res) {
responseError(res, '500', 'Internal Error', 'wtf.') responseError(res, '500', 'Internal Error', 'wtf.')
} }
function errorServiceUnavailable (res) { function errorServiceUnavailable (req, res) {
res.status(503).send('I\'m busy right now, try again later.') res.status(503).send('I\'m busy right now, try again later.')
} }