4 ms·
> If you _want_ to have some sort of hierarchy in the URL, you can redirect: > - /organizations/123/blogs/1234 -> /blogs/1234 And: /organizations/123/blogs -
by pan69 4y ago
> If you _want_ to have some sort of hierarchy in the URL, you can redirect:
> - /organizations/123/blogs/1234 -> /blogs/1234
And:
/organizations/123/blogs -> /blogs?organization_id=123
Because what you're doing is just applying a filter to an index of blog resources.
I.e. the "/organizations/123/blogs" route is simply an alias to "/blogs?organization_id=123" which you can just redirect to in your gateway.