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

@@ -13,9 +13,6 @@ export class SessionsRouter extends ClassesRouter {
}
handleGet(req) {
if (req.params.objectId === 'me') {
return this.handleMe(req);
}
req.params.className = '_Session';
return super.handleGet(req);
}
@@ -86,6 +83,7 @@ export class SessionsRouter extends ClassesRouter {
}
mountRoutes() {
this.route('GET','/sessions/me', req => { return this.handleMe(req); });
this.route('GET', '/sessions', req => { return this.handleFind(req); });
this.route('GET', '/sessions/:objectId', req => { return this.handleGet(req); });
this.route('POST', '/sessions', req => { return this.handleCreate(req); });