Require on the top of the files
This commit is contained in:
parent
9f10b2928d
commit
a030a9b234
|
@ -4,9 +4,13 @@ var express = require('express')
|
|||
|
||||
var router = express.Router()
|
||||
|
||||
router.use('/pods', require('./pods'))
|
||||
router.use('/remotevideos', require('./remoteVideos'))
|
||||
router.use('/videos', require('./videos'))
|
||||
var podsController = require('./pods')
|
||||
var remoteVideosController = require('./remoteVideos')
|
||||
var videosController = require('./videos')
|
||||
|
||||
router.use('/pods', podsController)
|
||||
router.use('/remotevideos', remoteVideosController)
|
||||
router.use('/videos', videosController)
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
|
|
|
@ -2,7 +2,10 @@
|
|||
|
||||
var constants = require('../initializers/constants')
|
||||
|
||||
var apiController = require('./api/' + constants.API_VERSION)
|
||||
var viewsController = require('./views')
|
||||
|
||||
module.exports = {
|
||||
api: require('./api/' + constants.API_VERSION),
|
||||
views: require('./views')
|
||||
api: apiController,
|
||||
views: viewsController
|
||||
}
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
'use strict'
|
||||
|
||||
var cacheMiddleware = require('./cache')
|
||||
var reqValidatorsMiddleware = require('./reqValidators')
|
||||
var secureMiddleware = require('./secure')
|
||||
|
||||
var middlewares = {
|
||||
cache: require('./cache'),
|
||||
reqValidators: require('./reqValidators'),
|
||||
secure: require('./secure')
|
||||
cache: cacheMiddleware,
|
||||
reqValidators: reqValidatorsMiddleware,
|
||||
secure: secureMiddleware
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
'use strict'
|
||||
|
||||
var podsReqValidators = require('./pods')
|
||||
var remoteReqValidators = require('./remote')
|
||||
var videosReqValidators = require('./videos')
|
||||
|
||||
var reqValidators = {
|
||||
videos: require('./videos'),
|
||||
pods: require('./pods'),
|
||||
remote: require('./remote')
|
||||
pods: podsReqValidators,
|
||||
remote: remoteReqValidators,
|
||||
videos: videosReqValidators
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue