diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-02-07 11:23:23 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-02-07 11:23:23 +0100 |
commit | 9f10b2928df655c3672d9607e864e667d4bc903a (patch) | |
tree | 7743911b974b3a7fb0d4c7cec2a723942466b7f1 /controllers/views.js | |
parent | d7c01e7793d813d804a3b5716d8288f9dcf71a16 (diff) | |
download | PeerTube-9f10b2928df655c3672d9607e864e667d4bc903a.tar.gz PeerTube-9f10b2928df655c3672d9607e864e667d4bc903a.tar.zst PeerTube-9f10b2928df655c3672d9607e864e667d4bc903a.zip |
Remove useless anonymous functions of files
Diffstat (limited to 'controllers/views.js')
-rw-r--r-- | controllers/views.js | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/controllers/views.js b/controllers/views.js index 82d3d00ab..aa9718079 100644 --- a/controllers/views.js +++ b/controllers/views.js | |||
@@ -1,29 +1,27 @@ | |||
1 | ;(function () { | 1 | 'use strict' |
2 | 'use strict' | ||
3 | 2 | ||
4 | var express = require('express') | 3 | var express = require('express') |
5 | 4 | ||
6 | var cacheMiddleware = require('../middlewares').cache | 5 | var cacheMiddleware = require('../middlewares').cache |
7 | 6 | ||
8 | var router = express.Router() | 7 | var router = express.Router() |
9 | 8 | ||
10 | router.get(/^\/(index)?$/, cacheMiddleware.cache(), getIndex) | 9 | router.get(/^\/(index)?$/, cacheMiddleware.cache(), getIndex) |
11 | router.get('/partials/:directory/:name', cacheMiddleware.cache(), getPartial) | 10 | router.get('/partials/:directory/:name', cacheMiddleware.cache(), getPartial) |
12 | 11 | ||
13 | // --------------------------------------------------------------------------- | 12 | // --------------------------------------------------------------------------- |
14 | 13 | ||
15 | module.exports = router | 14 | module.exports = router |
16 | 15 | ||
17 | // --------------------------------------------------------------------------- | 16 | // --------------------------------------------------------------------------- |
18 | 17 | ||
19 | function getIndex (req, res) { | 18 | function getIndex (req, res) { |
20 | res.render('index') | 19 | res.render('index') |
21 | } | 20 | } |
22 | 21 | ||
23 | function getPartial (req, res) { | 22 | function getPartial (req, res) { |
24 | var directory = req.params.directory | 23 | var directory = req.params.directory |
25 | var name = req.params.name | 24 | var name = req.params.name |
26 | 25 | ||
27 | res.render('partials/' + directory + '/' + name) | 26 | res.render('partials/' + directory + '/' + name) |
28 | } | 27 | } |
29 | })() | ||