X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmiddlewares%2Foauth.js;h=3a02b9b4863c1e16b06502ae781368f13a48b7cb;hb=a6375e69668ea42e19531c6bc68dcd37f3f7cbd7;hp=91a99050913eead153e1c281bd5b86c524fc5993;hpb=2f372a865487427ff97ad17edd0e6adfbb478c80;p=github%2FChocobozzz%2FPeerTube.git 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({ }) const oAuth = { - authenticate: authenticate, - token: token + authenticate, + token } function authenticate (req, res, next) { @@ -23,7 +23,7 @@ function authenticate (req, res, next) { return res.sendStatus(500) } - if (res.statusCode === 401 || res.statusCode === 400) return res.end() + if (res.statusCode === 401 || res.statusCode === 400 || res.statusCode === 503) return res.end() return next() })