aboutsummaryrefslogtreecommitdiffhomepage
path: root/routes/views.js
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-01-30 17:05:22 +0100
committerChocobozzz <florian.bigard@gmail.com>2016-01-30 17:05:22 +0100
commitcda021079ff455cc0fd0eb95a5395fa808ab63d1 (patch)
tree056716de7460462b74b861051a5e9da6e2633fce /routes/views.js
parent86435b9baedfe300a28ea4545511c1b50d4119f6 (diff)
downloadPeerTube-cda021079ff455cc0fd0eb95a5395fa808ab63d1.tar.gz
PeerTube-cda021079ff455cc0fd0eb95a5395fa808ab63d1.tar.zst
PeerTube-cda021079ff455cc0fd0eb95a5395fa808ab63d1.zip
New directory organization
Diffstat (limited to 'routes/views.js')
-rw-r--r--routes/views.js24
1 files changed, 0 insertions, 24 deletions
diff --git a/routes/views.js b/routes/views.js
deleted file mode 100644
index ebd97380e..000000000
--- a/routes/views.js
+++ /dev/null
@@ -1,24 +0,0 @@
1;(function () {
2 'use strict'
3
4 function getPartial (req, res) {
5 var directory = req.params.directory
6 var name = req.params.name
7
8 res.render('partials/' + directory + '/' + name)
9 }
10
11 function getIndex (req, res) {
12 res.render('index')
13 }
14
15 var express = require('express')
16 var middleware = require('../middlewares').misc
17
18 var router = express.Router()
19
20 router.get('/partials/:directory/:name', middleware.cache(), getPartial)
21 router.get(/^\/(index)?$/, middleware.cache(), getIndex)
22
23 module.exports = router
24})()