needle-innovision / nestjs-tenancy

Multi-tenancy approach for nestjs - currently supported only for mongodb with mongoose
MIT License
186 stars 58 forks source link

make tenantId optional #29

Open AdamJessop opened 2 years ago

AdamJessop commented 2 years ago

Re: issue https://github.com/needle-innovision/nestjs-tenancy/issues/27

Allow the tenantId to be optional.

Added forceCheck to the module options (default false) to state if the tenant should be checked on initialisation or not.

Added an TenantGuard to be able to specify if a route needs a tenant or not.

Notes:

sandeepsuvit commented 2 years ago

@AdamJessop Thanks a lot for this PR. Just to be sure could you also add few test cases to support your PR usage. Will update the docs accordingly after that.