tenantpilot/lib/email/index.ts
Ahmed Darrazi f80c3a1598
All checks were successful
Trigger Cloudarix Deploy / call-webhook (push) Successful in 1s
Fix: Multiple TypeScript build errors for production
- Remove unused NextAuthOptions import, use inferred types
- Add 'as const' to session strategy
- Add explicit callback parameter types with optional properties
- Update Stripe API version to 2025-11-17.clover
- Make Stripe and Resend initialization conditional for build time
- Update next-auth.d.ts type declarations
2025-12-05 23:49:00 +01:00

8 lines
240 B
TypeScript

import { Resend } from "resend";
const resendApiKey = process.env.RESEND_API_KEY;
export const resend = resendApiKey
? new Resend(resendApiKey)
: null as unknown as Resend; // Will fail at runtime if not configured, but allows build