diff options
Diffstat (limited to 'server/middlewares/index.js')
-rw-r--r-- | server/middlewares/index.js | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/server/middlewares/index.js b/server/middlewares/index.js index 0a233e701..1e294de5f 100644 --- a/server/middlewares/index.js +++ b/server/middlewares/index.js | |||
@@ -1,19 +1,21 @@ | |||
1 | 'use strict' | 1 | 'use strict' |
2 | 2 | ||
3 | const oauth = require('./oauth') | 3 | const adminMiddleware = require('./admin') |
4 | const pagination = require('./pagination') | 4 | const oauthMiddleware = require('./oauth') |
5 | const paginationMiddleware = require('./pagination') | ||
5 | const validatorsMiddleware = require('./validators') | 6 | const validatorsMiddleware = require('./validators') |
6 | const search = require('./search') | 7 | const searchMiddleware = require('./search') |
7 | const sort = require('./sort') | 8 | const sortMiddleware = require('./sort') |
8 | const secureMiddleware = require('./secure') | 9 | const secureMiddleware = require('./secure') |
9 | 10 | ||
10 | const middlewares = { | 11 | const middlewares = { |
11 | oauth: oauth, | 12 | admin: adminMiddleware, |
12 | pagination: pagination, | 13 | oauth: oauthMiddleware, |
13 | validators: validatorsMiddleware, | 14 | pagination: paginationMiddleware, |
14 | search: search, | 15 | search: searchMiddleware, |
15 | sort: sort, | 16 | secure: secureMiddleware, |
16 | secure: secureMiddleware | 17 | sort: sortMiddleware, |
18 | validators: validatorsMiddleware | ||
17 | } | 19 | } |
18 | 20 | ||
19 | // --------------------------------------------------------------------------- | 21 | // --------------------------------------------------------------------------- |