Improve check follow params tests
This commit is contained in:
parent
c5d31dba56
commit
eec63bbc0f
21 changed files with 232 additions and 150 deletions
|
@ -17,7 +17,11 @@ function authenticate (req: express.Request, res: express.Response, next: expres
|
|||
return res.sendStatus(500)
|
||||
}
|
||||
|
||||
if (res.statusCode === 401 || res.statusCode === 400 || res.statusCode === 503) return res.end()
|
||||
if (res.statusCode === 401 || res.statusCode === 400 || res.statusCode === 503) {
|
||||
return res.json({
|
||||
error: 'Authentication failed.'
|
||||
}).end()
|
||||
}
|
||||
|
||||
return next()
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue