Update hivegrid-cloud reference to latest main
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e98d38e716
commit
7b21524c86
3781 files changed
+373484
-225607
No files matched your search
@@ -3,7 +3,6 @@ import { reservedTenantChildRouteSlugs, reservedTenantRouteSlugs } from "../app/
|
||||
import { db } from "../db.server";
|
||||
import { deleteTenant } from "../db/tenants.db.server";
|
||||
import { getTenantSubscription } from "../db/tenantSubscriptions.db.server";
|
||||
import { deleteStripeCustomer } from "../stripe.server";
|
||||
import { TFunction } from "i18next";
|
||||
import { cancelTenantSubscription } from "./.server/subscriptionService";
|
||||
|
||||
@@ -55,11 +54,7 @@ export function validateDesiredTenantSlug(input: string): TenantSlugValidation {
|
||||
}
|
||||
|
||||
export async function deleteAndCancelTenant({ tenantId, userId, t }: { tenantId: string; userId: string; t?: TFunction }) {
|
||||
const tenantSubscription = await getTenantSubscription(tenantId);
|
||||
await cancelAllTenantPlans({ t, tenantId, userId });
|
||||
if (tenantSubscription?.stripeCustomerId) {
|
||||
await deleteStripeCustomer(tenantSubscription?.stripeCustomerId);
|
||||
}
|
||||
return await deleteTenant(tenantId);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user