1
0
Fork 0
peertube/server/controllers/api/v1/index.js
2016-03-14 13:50:19 +01:00

24 lines
638 B
JavaScript

'use strict'
var express = require('express')
var router = express.Router()
var podsController = require('./pods')
var remoteVideosController = require('./remoteVideos')
var videosController = require('./videos')
router.use('/pods', podsController)
router.use('/remotevideos', remoteVideosController)
router.use('/videos', videosController)
router.use('/*', badRequest)
// ---------------------------------------------------------------------------
module.exports = router
// ---------------------------------------------------------------------------
function badRequest (req, res, next) {
res.type('json').status(400).end()
}