Permalink
Browse files

Reverted parser-body middleware. Will reevaluate once mojito supports…

… express 4.
  • Loading branch information...
1 parent 168155b commit ab4170a6dfcf8f16561aa496f7b85294ed207d66 @aljimenez aljimenez committed Jul 14, 2014
Showing with 1 addition and 24 deletions.
  1. +1 −24 lib/app/middleware/mojito-parser-body.js
@@ -17,27 +17,4 @@
Export a function which can create a body parser.
@return {Object} The newly constructed body parser.
**/
-module.exports = require('express').bodyParser;
-
-var express = require('express'),
- json = express.json,
- urlencoded = express.urlencoded;
-
-module.exports = function bodyParser(options) {
- var _json = json(options),
- _urlencoded = urlencoded(options);
-
- return function (req, res, next) {
- _json(req, res, function (err) {
- if (err) {
- return next(err);
- }
- _urlencoded(req, res, function (err) {
- if (err) {
- return next(err);
- }
- next();
- });
- });
- };
-};
+module.exports = require('express').bodyParser;

0 comments on commit ab4170a

Please sign in to comment.