scoped collections - whats the best practice
Hi yall! Whats the ”best practice” for something like collections that are scoped to something like an organization id?
our app is multi-tenant. 90% of users stay in the same org all the time; but others have access to multiple. our api returns items on an endpoint like /organizations/:id/todos - thus I am going to need the org id in the collection.
Is it best practice to just have a factory function? Or am I missing something?
Thanks in advance!
our app is multi-tenant. 90% of users stay in the same org all the time; but others have access to multiple. our api returns items on an endpoint like /organizations/:id/todos - thus I am going to need the org id in the collection.
Is it best practice to just have a factory function? Or am I missing something?
Thanks in advance!