Skip to content

Commit

Permalink
fix: create tenant
Browse files Browse the repository at this point in the history
  • Loading branch information
sattvikc committed May 22, 2024
1 parent 0cb6270 commit a1351fa
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/ui/components/tenants/creatNewTenant/CreateNewTenant.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,8 @@ export const CreateNewTenantDialog = ({ onCloseDialog }: { onCloseDialog: () =>
setIsCreatingTenant(true);
const resp = await createTenant(tenantId);
if (resp.status === "OK") {
if (resp.createdNew) {
navigate(`?tenantId=${tenantId.toLowerCase()}`);
onCloseDialog();
} else {
setTenantCreationError("Tenant already exists");
}
navigate(`?tenantId=${tenantId.toLowerCase()}`);
onCloseDialog();
} else if (resp.status === "MULTITENANCY_NOT_ENABLED_IN_CORE_ERROR") {
setTenantCreationError(
"Multitenancy is not enabled for your SuperTokens instance. Please add a license key to enable it."
Expand Down

0 comments on commit a1351fa

Please sign in to comment.