aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/views.js
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-03-07 14:48:46 +0100
committerChocobozzz <florian.bigard@gmail.com>2016-03-07 14:48:46 +0100
commit6f4e252246c715a1dafc1e236c8074b08cdd12a3 (patch)
treeafa187e6b1c192e315156499f01f1d7e040977e0 /server/controllers/views.js
parentb9a3e09ad5a7673f64556d1dba122ed4c4fac980 (diff)
downloadPeerTube-6f4e252246c715a1dafc1e236c8074b08cdd12a3.tar.gz
PeerTube-6f4e252246c715a1dafc1e236c8074b08cdd12a3.tar.zst
PeerTube-6f4e252246c715a1dafc1e236c8074b08cdd12a3.zip
Prepare Angular routes
Diffstat (limited to 'server/controllers/views.js')
-rw-r--r--server/controllers/views.js27
1 files changed, 0 insertions, 27 deletions
diff --git a/server/controllers/views.js b/server/controllers/views.js
deleted file mode 100644
index aa9718079..000000000
--- a/server/controllers/views.js
+++ /dev/null
@@ -1,27 +0,0 @@
1'use strict'
2
3var express = require('express')
4
5var cacheMiddleware = require('../middlewares').cache
6
7var router = express.Router()
8
9router.get(/^\/(index)?$/, cacheMiddleware.cache(), getIndex)
10router.get('/partials/:directory/:name', cacheMiddleware.cache(), getPartial)
11
12// ---------------------------------------------------------------------------
13
14module.exports = router
15
16// ---------------------------------------------------------------------------
17
18function getIndex (req, res) {
19 res.render('index')
20}
21
22function getPartial (req, res) {
23 var directory = req.params.directory
24 var name = req.params.name
25
26 res.render('partials/' + directory + '/' + name)
27}