aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/oauth.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/middlewares/oauth.js')
-rw-r--r--server/middlewares/oauth.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/middlewares/oauth.js b/server/middlewares/oauth.js
index 91a990509..3a02b9b48 100644
--- a/server/middlewares/oauth.js
+++ b/server/middlewares/oauth.js
@@ -12,8 +12,8 @@ const oAuthServer = new OAuthServer({
12}) 12})
13 13
14const oAuth = { 14const oAuth = {
15 authenticate: authenticate, 15 authenticate,
16 token: token 16 token
17} 17}
18 18
19function authenticate (req, res, next) { 19function authenticate (req, res, next) {
@@ -23,7 +23,7 @@ function authenticate (req, res, next) {
23 return res.sendStatus(500) 23 return res.sendStatus(500)
24 } 24 }
25 25
26 if (res.statusCode === 401 || res.statusCode === 400) return res.end() 26 if (res.statusCode === 401 || res.statusCode === 400 || res.statusCode === 503) return res.end()
27 27
28 return next() 28 return next()
29 }) 29 })