1
0
Fork 0
peertube/server/controllers/api/v1/index.js
2016-03-21 11:56:33 +01:00

26 lines
729 B
JavaScript

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