Refactors PushController and FilesController to support multiple apps

This commit is contained in:
Florent Vilmart
2016-02-18 23:19:21 -05:00
parent 8aaf8f2ff2
commit 067946c66c
4 changed files with 37 additions and 14 deletions

View File

@@ -31,11 +31,11 @@ export class PushController {
}
});
}
getExpressRouter() {
static getExpressRouter() {
var router = new PromiseRouter();
router.route('POST','/push', (req) => {
return this.handlePOST(req);
return req.config.pushController.handlePOST(req);
});
return router;
}