diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-10-21 11:20:14 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-10-21 11:20:14 +0200 |
commit | 792b893ed414301c060391ed8a00368d68688236 (patch) | |
tree | 9f060fd0d2add1e470a7084e55fde6e0a121ed75 /server/controllers/api/v1/index.js | |
parent | c2ee5ce83a2dac9ed16f1ac3e16bd5eca67eabd1 (diff) | |
download | PeerTube-792b893ed414301c060391ed8a00368d68688236.tar.gz PeerTube-792b893ed414301c060391ed8a00368d68688236.tar.zst PeerTube-792b893ed414301c060391ed8a00368d68688236.zip |
Server: add npm run check to check CORS, bittorrent tracker...
Diffstat (limited to 'server/controllers/api/v1/index.js')
-rw-r--r-- | server/controllers/api/v1/index.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/server/controllers/api/v1/index.js b/server/controllers/api/v1/index.js index 2e4fb2dab..4cb65ed55 100644 --- a/server/controllers/api/v1/index.js +++ b/server/controllers/api/v1/index.js | |||
@@ -17,6 +17,7 @@ router.use('/remote', remoteController) | |||
17 | router.use('/requests', requestsController) | 17 | router.use('/requests', requestsController) |
18 | router.use('/users', usersController) | 18 | router.use('/users', usersController) |
19 | router.use('/videos', videosController) | 19 | router.use('/videos', videosController) |
20 | router.use('/ping', pong) | ||
20 | router.use('/*', badRequest) | 21 | router.use('/*', badRequest) |
21 | 22 | ||
22 | // --------------------------------------------------------------------------- | 23 | // --------------------------------------------------------------------------- |
@@ -25,6 +26,10 @@ module.exports = router | |||
25 | 26 | ||
26 | // --------------------------------------------------------------------------- | 27 | // --------------------------------------------------------------------------- |
27 | 28 | ||
29 | function pong (req, res, next) { | ||
30 | return res.send('pong').status(200).end() | ||
31 | } | ||
32 | |||
28 | function badRequest (req, res, next) { | 33 | function badRequest (req, res, next) { |
29 | res.type('json').status(400).end() | 34 | res.type('json').status(400).end() |
30 | } | 35 | } |