When modeling a resource in REST way. We use hierarchical pattern.
I will model my User resource at /users and profile of a user at /users/:id/profile
Also, a user must be authenticated using a token to access their profile, in this case JWT.
So, I also can model this way /user and user/profile.
I have this confusion for a long, but have a hunch at the same time that first one is better.
Should I pass and get id from params or from JWT token?