diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-09-20 22:45:14 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-09-20 22:45:14 +0200 |
commit | f9b2d2cedd1b669516328b98e23f0c2298581025 (patch) | |
tree | 34f180070bf7cfb3036d22342f865f52666c0522 /server | |
parent | ec8d8440a893ba64075da2e57ea04c7976e0b303 (diff) | |
download | PeerTube-f9b2d2cedd1b669516328b98e23f0c2298581025.tar.gz PeerTube-f9b2d2cedd1b669516328b98e23f0c2298581025.tar.zst PeerTube-f9b2d2cedd1b669516328b98e23f0c2298581025.zip |
Fix client peer dependencies
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 | ||