2016-02-07 11:23:23 +01:00
|
|
|
'use strict'
|
2015-06-09 17:41:40 +02:00
|
|
|
|
2016-02-07 11:23:23 +01:00
|
|
|
var express = require('express')
|
2016-01-31 11:23:52 +01:00
|
|
|
|
2016-02-07 11:23:23 +01:00
|
|
|
var router = express.Router()
|
2015-06-09 17:41:40 +02:00
|
|
|
|
2016-02-07 11:47:30 +01:00
|
|
|
var podsController = require('./pods')
|
|
|
|
var remoteVideosController = require('./remoteVideos')
|
|
|
|
var videosController = require('./videos')
|
|
|
|
|
|
|
|
router.use('/pods', podsController)
|
|
|
|
router.use('/remotevideos', remoteVideosController)
|
|
|
|
router.use('/videos', videosController)
|
2016-03-07 18:53:03 +01:00
|
|
|
router.use('/*', badRequest)
|
2016-01-31 11:23:52 +01:00
|
|
|
|
2016-02-07 11:23:23 +01:00
|
|
|
// ---------------------------------------------------------------------------
|
2015-11-07 18:22:05 +01:00
|
|
|
|
2016-02-07 11:23:23 +01:00
|
|
|
module.exports = router
|
2016-03-07 18:53:03 +01:00
|
|
|
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
function badRequest (req, res, next) {
|
2016-03-14 13:50:19 +01:00
|
|
|
res.type('json').status(400).end()
|
2016-03-07 18:53:03 +01:00
|
|
|
}
|