Reverts calling next() after handling response (#2634)

* Revert "Makes sure routes don't overlap and yield a header set error"

* removes next() calls in PromiseRouter

* Reverts calling next() after response

* Adds fail calls when next() calls traverse tests
This commit is contained in:
Florent Vilmart
2016-09-09 17:28:41 -04:00
committed by GitHub
parent 7f6fb11d78
commit ac348f5c4f
7 changed files with 20 additions and 26 deletions

View File

@@ -273,7 +273,9 @@ class ParseServer {
api.use('/', bodyParser.urlencoded({extended: false}), new PublicAPIRouter().expressRouter());
api.use(bodyParser.json({ 'type': '*/*' , limit: maxUploadSize }));
api.use(middlewares.allowCrossDomain);
api.use(middlewares.allowMethodOverride);
api.use(middlewares.handleParseHeaders);
let appRouter = ParseServer.promiseRouter({ appId });
api.use(appRouter.expressRouter());
@@ -322,8 +324,6 @@ class ParseServer {
}, []);
let appRouter = new PromiseRouter(routes, appId);
appRouter.use(middlewares.allowCrossDomain);
appRouter.use(middlewares.handleParseHeaders);
batch.mountOnto(appRouter);
return appRouter;