Errorname / prisma-multi-tenant

🧭 Use Prisma as a multi-tenant provider for your application
MIT License
396 stars 45 forks source link

Implement a method to check if a tenant exists #20

Closed BjoernRave closed 4 years ago

BjoernRave commented 4 years ago

Currently when I want to check if a tenant already exists I need to wrap the .get function in a trycatch block, because it will throw, when it can't find a tenant.

It would be nice to have a cleaner way to check if a tenant already exists

Errorname commented 4 years ago

prisma-multi-tenant@2.0.0-alpha19 now implements an .existsTenant(name: string): Promise<Boolean> method to check if a tenant exists in the management