2016-02-07 04:23:23 -06:00
|
|
|
'use strict'
|
2015-06-09 10:41:40 -05:00
|
|
|
|
2016-03-16 16:29:27 -05:00
|
|
|
const express = require('express')
|
2016-01-31 04:23:52 -06:00
|
|
|
|
2016-12-30 05:53:41 -06:00
|
|
|
const utils = require('../../helpers/utils')
|
|
|
|
|
2016-03-16 16:29:27 -05:00
|
|
|
const router = express.Router()
|
2015-06-09 10:41:40 -05:00
|
|
|
|
2016-08-05 09:09:39 -05:00
|
|
|
const clientsController = require('./clients')
|
2017-03-10 04:32:39 -06:00
|
|
|
const configController = require('./config')
|
2016-03-16 16:29:27 -05:00
|
|
|
const podsController = require('./pods')
|
2016-06-18 09:13:54 -05:00
|
|
|
const remoteController = require('./remote')
|
2016-09-19 14:33:46 -05:00
|
|
|
const requestsController = require('./requests')
|
2016-03-21 05:56:33 -05:00
|
|
|
const usersController = require('./users')
|
2016-03-16 16:29:27 -05:00
|
|
|
const videosController = require('./videos')
|
2016-02-07 04:47:30 -06:00
|
|
|
|
2016-08-05 09:09:39 -05:00
|
|
|
router.use('/clients', clientsController)
|
2017-03-10 04:32:39 -06:00
|
|
|
router.use('/config', configController)
|
2016-02-07 04:47:30 -06:00
|
|
|
router.use('/pods', podsController)
|
2016-06-18 09:13:54 -05:00
|
|
|
router.use('/remote', remoteController)
|
2016-09-19 14:33:46 -05:00
|
|
|
router.use('/requests', requestsController)
|
2016-03-21 05:56:33 -05:00
|
|
|
router.use('/users', usersController)
|
2016-02-07 04:47:30 -06:00
|
|
|
router.use('/videos', videosController)
|
2016-10-21 04:20:14 -05:00
|
|
|
router.use('/ping', pong)
|
2016-12-30 05:53:41 -06:00
|
|
|
router.use('/*', utils.badRequest)
|
2016-01-31 04:23:52 -06:00
|
|
|
|
2016-02-07 04:23:23 -06:00
|
|
|
// ---------------------------------------------------------------------------
|
2015-11-07 11:22:05 -06:00
|
|
|
|
2016-02-07 04:23:23 -06:00
|
|
|
module.exports = router
|
2016-03-07 11:53:03 -06:00
|
|
|
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
|
2016-10-21 04:20:14 -05:00
|
|
|
function pong (req, res, next) {
|
|
|
|
return res.send('pong').status(200).end()
|
|
|
|
}
|