aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/index.js
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-01-12 15:20:03 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-01-12 15:20:03 +0100
commit99fe265a5fc077cb66c322e7f3d191ff7110aea0 (patch)
treec9e04ccfcc5496d2300d7c26db5833e494b4cdad /server/controllers/api/index.js
parentfcc5f77b95d330bfcb439c172b7fcc58f3162e4d (diff)
parent91cc839af88730ba55f84997c56b85ea100070a7 (diff)
downloadPeerTube-99fe265a5fc077cb66c322e7f3d191ff7110aea0.tar.gz
PeerTube-99fe265a5fc077cb66c322e7f3d191ff7110aea0.tar.zst
PeerTube-99fe265a5fc077cb66c322e7f3d191ff7110aea0.zip
Merge branch 'postgresql'
Diffstat (limited to 'server/controllers/api/index.js')
-rw-r--r--server/controllers/api/index.js8
1 files changed, 3 insertions, 5 deletions
diff --git a/server/controllers/api/index.js b/server/controllers/api/index.js
index 4cb65ed55..f13ff922c 100644
--- a/server/controllers/api/index.js
+++ b/server/controllers/api/index.js
@@ -2,6 +2,8 @@
2 2
3const express = require('express') 3const express = require('express')
4 4
5const utils = require('../../helpers/utils')
6
5const router = express.Router() 7const router = express.Router()
6 8
7const clientsController = require('./clients') 9const clientsController = require('./clients')
@@ -18,7 +20,7 @@ router.use('/requests', requestsController)
18router.use('/users', usersController) 20router.use('/users', usersController)
19router.use('/videos', videosController) 21router.use('/videos', videosController)
20router.use('/ping', pong) 22router.use('/ping', pong)
21router.use('/*', badRequest) 23router.use('/*', utils.badRequest)
22 24
23// --------------------------------------------------------------------------- 25// ---------------------------------------------------------------------------
24 26
@@ -29,7 +31,3 @@ module.exports = router
29function pong (req, res, next) { 31function pong (req, res, next) {
30 return res.send('pong').status(200).end() 32 return res.send('pong').status(200).end()
31} 33}
32
33function badRequest (req, res, next) {
34 res.type('json').status(400).end()
35}