mirror of https://github.com/status-im/codimd.git
refactor: change errorServiceUnavailable function signature to avoid parameter passing error
Signed-off-by: BoHong Li <raccoon@hackmd.io>
This commit is contained in:
parent
13ed2e6b44
commit
da3fd00577
|
@ -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()
|
||||||
}
|
}
|
||||||
|
|
|
@ -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.')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue