Revert "FIX: 404 page when clicking a badge notification from before changing username"
This commit is contained in:
parent
7d501058d7
commit
20e44b3c14
|
@ -30,9 +30,20 @@ export default Discourse.Route.extend({
|
||||||
afterModel(model, transition) {
|
afterModel(model, transition) {
|
||||||
const username = transition.queryParams && transition.queryParams.username;
|
const username = transition.queryParams && transition.queryParams.username;
|
||||||
|
|
||||||
return UserBadge.findByBadgeId(model.get("id"), {username}).then(userBadges => {
|
const userBadgesGrant = UserBadge.findByBadgeId(model.get("id"), {username}).then(userBadges => {
|
||||||
this.userBadgesGrant = userBadges;
|
this.userBadgesGrant = userBadges;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const userBadgesAll = UserBadge.findByUsername(username).then(userBadges => {
|
||||||
|
this.userBadgesAll = userBadges;
|
||||||
|
});
|
||||||
|
|
||||||
|
const promises = {
|
||||||
|
userBadgesGrant,
|
||||||
|
userBadgesAll,
|
||||||
|
};
|
||||||
|
|
||||||
|
return Ember.RSVP.hash(promises);
|
||||||
},
|
},
|
||||||
|
|
||||||
titleToken() {
|
titleToken() {
|
||||||
|
|
Loading…
Reference in New Issue