diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/middlewares/oauth.js | 2 | ||||
-rw-r--r-- | server/tests/api/check-params.js | 7 |
2 files changed, 1 insertions, 8 deletions
diff --git a/server/middlewares/oauth.js b/server/middlewares/oauth.js index 91a990509..08584c41c 100644 --- a/server/middlewares/oauth.js +++ b/server/middlewares/oauth.js | |||
@@ -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 | }) |
diff --git a/server/tests/api/check-params.js b/server/tests/api/check-params.js index a696bc171..57b5ca024 100644 --- a/server/tests/api/check-params.js +++ b/server/tests/api/check-params.js | |||
@@ -697,13 +697,6 @@ describe('Test parameters validator', function () { | |||
697 | .set('Authorization', 'Bearer ' + server.accessToken) | 697 | .set('Authorization', 'Bearer ' + server.accessToken) |
698 | .expect(404, done) | 698 | .expect(404, done) |
699 | }) | 699 | }) |
700 | |||
701 | it('Should success with the correct parameters', function (done) { | ||
702 | request(server.url) | ||
703 | .delete(path + userId) | ||
704 | .set('Authorization', 'Bearer ' + server.accessToken) | ||
705 | .expect(204, done) | ||
706 | }) | ||
707 | }) | 700 | }) |
708 | }) | 701 | }) |
709 | 702 | ||