client/routing: move routing to controllers

This commit is contained in:
rr-
2016-04-06 21:49:26 +02:00
parent 55cc7b59e4
commit 5f29fa12c2
13 changed files with 92 additions and 62 deletions

View File

@ -23,6 +23,16 @@ class AuthController {
}
}
registerRoutes() {
page(/\/password-reset\/([^:]+):([^:]+)$/,
(ctx, next) => {
this.passwordResetFinishRoute(ctx.params[0], ctx.params[1]);
});
page('/password-reset', (ctx, next) => { this.passwordResetRoute(); });
page('/login', (ctx, next) => { this.loginRoute(); });
page('/logout', (ctx, next) => { this.logoutRoute(); });
}
loginRoute() {
topNavController.activate('login');
this.loginView.render({