diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-10-21 12:16:28 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-10-21 12:16:28 +0200 |
commit | f253b1c1f19d9cb056ab95b2cb6208952e073894 (patch) | |
tree | ce75f6a96d9ceebd09d33cedfa008c4efb32477b /server/controllers/api/v1/index.js | |
parent | 844e39c2f843c6e2db81699176f13972c29c42fa (diff) | |
download | PeerTube-f253b1c1f19d9cb056ab95b2cb6208952e073894.tar.gz PeerTube-f253b1c1f19d9cb056ab95b2cb6208952e073894.tar.zst PeerTube-f253b1c1f19d9cb056ab95b2cb6208952e073894.zip |
Server: remove v1 directory, we don't really need it
Diffstat (limited to 'server/controllers/api/v1/index.js')
-rw-r--r-- | server/controllers/api/v1/index.js | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/server/controllers/api/v1/index.js b/server/controllers/api/v1/index.js deleted file mode 100644 index 4cb65ed55..000000000 --- a/server/controllers/api/v1/index.js +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | 'use strict' | ||
2 | |||
3 | const express = require('express') | ||
4 | |||
5 | const router = express.Router() | ||
6 | |||
7 | const clientsController = require('./clients') | ||
8 | const podsController = require('./pods') | ||
9 | const remoteController = require('./remote') | ||
10 | const requestsController = require('./requests') | ||
11 | const usersController = require('./users') | ||
12 | const videosController = require('./videos') | ||
13 | |||
14 | router.use('/clients', clientsController) | ||
15 | router.use('/pods', podsController) | ||
16 | router.use('/remote', remoteController) | ||
17 | router.use('/requests', requestsController) | ||
18 | router.use('/users', usersController) | ||
19 | router.use('/videos', videosController) | ||
20 | router.use('/ping', pong) | ||
21 | router.use('/*', badRequest) | ||
22 | |||
23 | // --------------------------------------------------------------------------- | ||
24 | |||
25 | module.exports = router | ||
26 | |||
27 | // --------------------------------------------------------------------------- | ||
28 | |||
29 | function pong (req, res, next) { | ||
30 | return res.send('pong').status(200).end() | ||
31 | } | ||
32 | |||
33 | function badRequest (req, res, next) { | ||
34 | res.type('json').status(400).end() | ||
35 | } | ||