35 ms·
The data model matters doesn't it? If it's /org/orgId/blog/blogId and a user has access to only a single orgId and needs to be logged in then doing it in /blog
by Brystephor 4y ago
The data model matters doesn't it?
If it's /org/orgId/blog/blogId and a user has access to only a single orgId and needs to be logged in then doing it in /blog/blogId makes sense.
But if a user has acess to multiple orgs via different orgIds, then it makes more sense to do the former with /org/orgId/blog/blogId because then the page is sharable via URL. If you do just /blog/blogId that prevents a user from easily accessing a new organization (unless you use query parameters)
- mtrpcic 4y agoJust gives blogs unique IDs regardless of the organization. No two blogs ever have the same ID. Now the route doesn't need to provide the Organization ID, because that association lives in the data store for your application and you can infer it.