diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-02-04 21:16:27 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-02-04 21:23:06 +0100 |
commit | a5fa04b0cce851f680a45055f57ed2c3d22f1c82 (patch) | |
tree | 0749c4d6889d7cf250110f9ff59a8cd22ee8a480 /controllers/views.js | |
parent | c173e56520b0fe4206b9ea8049b6add40bfeabcd (diff) | |
download | PeerTube-a5fa04b0cce851f680a45055f57ed2c3d22f1c82.tar.gz PeerTube-a5fa04b0cce851f680a45055f57ed2c3d22f1c82.tar.zst PeerTube-a5fa04b0cce851f680a45055f57ed2c3d22f1c82.zip |
Split misc middleware
Diffstat (limited to 'controllers/views.js')
-rw-r--r-- | controllers/views.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/controllers/views.js b/controllers/views.js index 1bb4ffe70..82d3d00ab 100644 --- a/controllers/views.js +++ b/controllers/views.js | |||
@@ -3,12 +3,12 @@ | |||
3 | 3 | ||
4 | var express = require('express') | 4 | var express = require('express') |
5 | 5 | ||
6 | var middleware = require('../middlewares').misc | 6 | var cacheMiddleware = require('../middlewares').cache |
7 | 7 | ||
8 | var router = express.Router() | 8 | var router = express.Router() |
9 | 9 | ||
10 | router.get(/^\/(index)?$/, middleware.cache(), getIndex) | 10 | router.get(/^\/(index)?$/, cacheMiddleware.cache(), getIndex) |
11 | router.get('/partials/:directory/:name', middleware.cache(), getPartial) | 11 | router.get('/partials/:directory/:name', cacheMiddleware.cache(), getPartial) |
12 | 12 | ||
13 | // --------------------------------------------------------------------------- | 13 | // --------------------------------------------------------------------------- |
14 | 14 | ||