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



                                                                              
                                    
 
'use strict'

const express = require('express')

const router = express.Router()

const clientsController = require('./clients')
const podsController = require('./pods')
const remoteController = require('./remote')
const usersController = require('./users')
const videosController = require('./videos')

router.use('/clients', clientsController)
router.use('/pods', podsController)
router.use('/remote', remoteController)
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()
}