Suspendedremoval
Some checks failed
Build and Push / build (push) Failing after 41s

This commit is contained in:
2026-05-01 18:11:42 +02:00
parent a5812dca9a
commit de1bb9bd02
2 changed files with 10 additions and 9 deletions

View File

@@ -103,11 +103,13 @@ export async function POST(
); );
} }
await updateTenantRequestStatus(id, "approved", adminNotes); await updateTenantRequestStatus(id, "approved", { adminNotes });
await sendApprovalEmail(tenantRequest, tenantRequest.tenantName).catch( await sendApprovalEmail(
(e) => console.error("approval email failed:", e) tenantRequest.contactEmail,
); tenantRequest.contactName,
tenantRequest.companyName
).catch((e) => console.error("approval email failed:", e));
return NextResponse.json({ return NextResponse.json({
message: "Resume approved. Tenant is reactivating.", message: "Resume approved. Tenant is reactivating.",

View File

@@ -103,12 +103,11 @@ export async function POST(
try { try {
const resumeRequest = await createResumeRequest({ const resumeRequest = await createResumeRequest({
tenantName: name, tenantName: name,
zitadelOrgId: tenant.metadata.labels?.[ zitadelOrgId:
"pieced.ch/zitadel-org-id" tenant.metadata.labels?.["pieced.ch/zitadel-org-id"] ?? user.orgId,
] ?? user.zitadelOrgId,
zitadelUserId: user.id, zitadelUserId: user.id,
contactName: user.name ?? user.email ?? "Unknown", contactName: user.name,
contactEmail: user.email ?? "unknown@example.invalid", contactEmail: user.email,
companyName: provision?.companyName ?? tenant.spec.displayName ?? name, companyName: provision?.companyName ?? tenant.spec.displayName ?? name,
agentName: provision?.agentName ?? "Assistant", agentName: provision?.agentName ?? "Assistant",
}); });