front/users: fix user routing

This commit is contained in:
rr- 2016-03-29 12:33:37 +02:00
parent 8f375a4163
commit 4a13933590

View file

@ -60,8 +60,18 @@ page('/post/:id/edit', id => { postsController.editPostRoute(id); });
page('/register', () => { usersController.createUserRoute(); });
page('/users', () => { usersController.listUsersRoute(); });
page('/user/:user', user => { usersController.showUserRoute(user); });
page('/user/:user/edit', user => { usersController.editUserRoute(user); });
page(
'/user/:name',
(ctx, next) => {
usersController.showUserRoute(ctx.params.name);
});
page(
'/user/:name/edit',
(ctx, next) => {
usersController.editUserRoute(ctx.params.name);
});
page('/history', () => { historyController.showHistoryRoute(); });
page('/tags', () => { tagsController.listTagsRoute(); });