Correção de integração com o resend

This commit is contained in:
Guilherme Bano
2026-02-20 23:38:13 -03:00
committed by Felipe Coutinho
parent 446ab0bb38
commit 94f6b0a986
7 changed files with 34 additions and 7 deletions

View File

@@ -5,6 +5,7 @@ import { revalidatePath } from "next/cache";
import { Resend } from "resend";
import { z } from "zod";
import { lancamentos, pagadores } from "@/db/schema";
import { getResendFromEmail } from "@/lib/email/resend";
import { getUser } from "@/lib/auth/server";
import { db } from "@/lib/db";
import {
@@ -418,8 +419,7 @@ export async function sendPagadorSummaryAction(
}
const resendApiKey = process.env.RESEND_API_KEY;
const resendFrom =
process.env.RESEND_FROM_EMAIL ?? "OpenMonetis <onboarding@resend.dev>";
const resendFrom = getResendFromEmail();
if (!resendApiKey) {
return {