aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/v1
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-10-21 11:20:14 +0200
committerChocobozzz <florian.bigard@gmail.com>2016-10-21 11:20:14 +0200
commit792b893ed414301c060391ed8a00368d68688236 (patch)
tree9f060fd0d2add1e470a7084e55fde6e0a121ed75 /server/controllers/api/v1
parentc2ee5ce83a2dac9ed16f1ac3e16bd5eca67eabd1 (diff)
downloadPeerTube-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')
-rw-r--r--server/controllers/api/v1/index.js5
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)
17router.use('/requests', requestsController) 17router.use('/requests', requestsController)
18router.use('/users', usersController) 18router.use('/users', usersController)
19router.use('/videos', videosController) 19router.use('/videos', videosController)
20router.use('/ping', pong)
20router.use('/*', badRequest) 21router.use('/*', badRequest)
21 22
22// --------------------------------------------------------------------------- 23// ---------------------------------------------------------------------------
@@ -25,6 +26,10 @@ module.exports = router
25 26
26// --------------------------------------------------------------------------- 27// ---------------------------------------------------------------------------
27 28
29function pong (req, res, next) {
30 return res.send('pong').status(200).end()
31}
32
28function badRequest (req, res, next) { 33function badRequest (req, res, next) {
29 res.type('json').status(400).end() 34 res.type('json').status(400).end()
30} 35}