Is the route /users/:username different for different actions?


(Steven Slade) #1

I am trying to change the default view of profile from /activity to /summary.

The route sending users to profile is /users/:username/ which is most commonly used for the avatar drop-down link to the profile and also the user badge card when click on a user avatar anywhere in Discourse.

For the the user badge card, it is a this.transitionTo('userActivity'); in app/javascript/discourse/routes/user-index.js.es6. As a hack I was going to change the transitionTo to /users/my/summary/.

However, it seems as though this change does not effect the avatar drop-down nav route (which is still users/:username but for some reason still redirects to /users/:username/activity/.

Thoughts on a better way to do this or how to change all routes of /users/:username/ to redirect to /summary? :rocket:


(Steven Slade) #2

Oh wow just realizing my hack of users/my/summary/ makes zero sense. :scream: That would just take you to the current_users profile every time you wanted to see someone else’s profile. Oops.

So basically I have no idea how to change to default route of users/:username to users/:username/summary/ :cold_sweat: