4 ms·
I just had this exact 'problem' with an API I'm building. I just ended up creating both routes which accessed the same internal function to return the same res
by iamphilrae 9y ago
I just had this exact 'problem' with an API I'm building. I just ended up creating both routes which accessed the same internal function to return the same results - no duplication of code necessary. Personally I think this is a good resolve as it answers both use cases depending on the accesssors context.
- iamphilrae 9y agoTo add, my endpoints were: /accounts/{id}/users And /users/account/{id} Both return the users attached to a particular account.