mirror of
https://github.com/discourse/discourse.git
synced 2025-09-04 08:47:37 +08:00
FIX: 404 page when clicking a badge notification from before changing username
This commit is contained in:
parent
10ed4c0078
commit
aab2d102ff
1 changed files with 1 additions and 12 deletions
|
@ -30,20 +30,9 @@ export default Discourse.Route.extend({
|
|||
afterModel(model, transition) {
|
||||
const username = transition.queryParams && transition.queryParams.username;
|
||||
|
||||
const userBadgesGrant = UserBadge.findByBadgeId(model.get("id"), {username}).then(userBadges => {
|
||||
return UserBadge.findByBadgeId(model.get("id"), {username}).then(userBadges => {
|
||||
this.userBadgesGrant = userBadges;
|
||||
});
|
||||
|
||||
const userBadgesAll = UserBadge.findByUsername(username).then(userBadges => {
|
||||
this.userBadgesAll = userBadges;
|
||||
});
|
||||
|
||||
const promises = {
|
||||
userBadgesGrant,
|
||||
userBadgesAll,
|
||||
};
|
||||
|
||||
return Ember.RSVP.hash(promises);
|
||||
},
|
||||
|
||||
titleToken() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue