aboutsummaryrefslogblamecommitdiffhomepage
path: root/server/controllers/api/v1/index.js
blob: 7b3ec32c054b8b08381fc4b6ebc74325d465e865 (plain) (tree)
1
2
3
4
5
6
7
8
9
            
 
                                  
 
                               
 

                                                        
                                          
                                            


                                                   
                                     
                                       
                            
 
                                                                              
 
                       



                                                                              
                                    
 
'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()
}