diff options
| author | rr- <rr-@sakuya.pl> | 2016-08-28 23:55:45 +0200 |
|---|---|---|
| committer | rr- <rr-@sakuya.pl> | 2016-08-28 23:57:53 +0200 |
| commit | acd989cabbadf76e3ee33e901d99e07a37cd4a5e (patch) | |
| tree | c543d117c45f30024968823761fd2a34816d9c5c /client/js/controllers/user_controller.js | |
| parent | 997eb3de63b9258dbd4d7030667b51c4b48f3808 (diff) | |
client/tags: fix URL redirections
User controller didn't need intervention but I refactored it to match
tag controller anyway.
Diffstat (limited to 'client/js/controllers/user_controller.js')
| -rw-r--r-- | client/js/controllers/user_controller.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/client/js/controllers/user_controller.js b/client/js/controllers/user_controller.js index 0e2b961..e9aeb7d 100644 --- a/client/js/controllers/user_controller.js +++ b/client/js/controllers/user_controller.js @@ -26,7 +26,7 @@ class UserController { const infix = isLoggedIn ? 'self' : 'any'; this._name = userName; - user.addEventListener('change', e => this._evtSaved(e)); + user.addEventListener('change', e => this._evtSaved(e, section)); const myRankIndex = api.user ? api.allRanks.indexOf(api.user.rank) : @@ -73,11 +73,11 @@ class UserController { misc.enableExitConfirmation(); } - _evtSaved(e) { + _evtSaved(e, section) { misc.disableExitConfirmation(); if (this._name !== e.detail.user.name) { router.replace( - '/user/' + e.detail.user.name + '/edit', null, false); + '/user/' + e.detail.user.name + '/' + section, null, false); } } |