front/users: fix user routing
This commit is contained in:
parent
8f375a4163
commit
4a13933590
1 changed files with 12 additions and 2 deletions
|
@ -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(); });
|
||||
|
|
Loading…
Reference in a new issue