add req.t in place of i18n.t passing req.language, begins implementing user signup

This commit is contained in:
Matteo Pagliazzi
2015-11-18 22:04:36 +01:00
parent 662c9ecc29
commit 5c859ca52e
4 changed files with 66 additions and 20 deletions

View File

@@ -1,5 +1,6 @@
// This module is only used to attach middlewares to the express app
import expressValidator from 'express-validator';
import getUserLanguage from './getUserLanguage';
import analytics from './analytics';
import errorHandler from './errorHandler';
import bodyParser from 'body-parser';
@@ -21,6 +22,7 @@ export default function attachMiddlewares (app) {
app.use(bodyParser.json());
app.use(expressValidator()); // TODO config
app.use(analytics);
app.use(getUserLanguage);
app.use('/api/v3', routes);
app.use(notFoundHandler);