wip user controllers: local login method

This commit is contained in:
Matteo Pagliazzi
2015-11-18 18:02:35 +01:00
parent 2dfca76a5e
commit d5d13477d7
6 changed files with 103 additions and 57 deletions

View File

@@ -1,5 +1,5 @@
// This module is only used to attach middlewares to the express app
import expressValidator from 'express-validator';
import analytics from './analytics';
import errorHandler from './errorHandler';
import bodyParser from 'body-parser';
@@ -19,6 +19,7 @@ export default function attachMiddlewares (app) {
extended: true, // Uses 'qs' library as old connect middleware
}));
app.use(bodyParser.json());
app.use(expressValidator()); // TODO config
app.use(analytics);
app.use('/api/v3', routes);