Compare commits
No commits in common. "b41afa6c98e9fbc0e46d9959113d37a49af689f8" and "985f521713376e052763d2e2843fc31c6a0a4b72" have entirely different histories.
b41afa6c98
...
985f521713
|
|
@ -23,5 +23,4 @@ pnpm-debug.log*
|
||||||
.idea/
|
.idea/
|
||||||
|
|
||||||
/generated/prisma
|
/generated/prisma
|
||||||
/prisma/*.db
|
/prisma/*.db
|
||||||
prisma/dev.db
|
|
||||||
|
|
@ -64,31 +64,6 @@ export const POST: APIRoute = async ({ request }) => {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
const emailApiKey = import.meta.env.EMAIL_API_KEY;
|
|
||||||
|
|
||||||
const emailResponse = await fetch("http://155.138.215.11:3050/email/send", {
|
|
||||||
method: "POST",
|
|
||||||
headers: {
|
|
||||||
"Content-Type": "application/json",
|
|
||||||
"x-api-key": emailApiKey!,
|
|
||||||
},
|
|
||||||
body: JSON.stringify({
|
|
||||||
type: "CENTRO_DEL_REINO_PAZ_Y_JUSTICIA_INFO",
|
|
||||||
data: {
|
|
||||||
nombre,
|
|
||||||
email,
|
|
||||||
mensaje,
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
});
|
|
||||||
|
|
||||||
if (!emailResponse.ok) {
|
|
||||||
console.error("Error enviando correo");
|
|
||||||
return new Response(
|
|
||||||
JSON.stringify({ error: "Error en servicio de correo" }),
|
|
||||||
{ status: 500 }
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return new Response(null, {
|
return new Response(null, {
|
||||||
status: 302,
|
status: 302,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue