commented out unnecessary code
This commit is contained in:
parent
f6578cf60b
commit
a99e936728
@ -1,15 +1,12 @@
|
|||||||
"use server"
|
"use server"
|
||||||
|
|
||||||
import { Resend } from "resend"
|
import { Resend } from "resend"
|
||||||
import { validateString } from "@/lib/utils";
|
import { validateString } from "@/lib/utils";
|
||||||
import OrderFormEmailClient from "../emailTemplates/order-form-email-client";
|
import OrderFormEmailClient from "../emailTemplates/order-form-email-client";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import 'dotenv/config';
|
import 'dotenv/config';
|
||||||
|
|
||||||
|
|
||||||
const resend = new Resend(process.env.RESEND_API_KEY);
|
const resend = new Resend(process.env.RESEND_API_KEY);
|
||||||
|
|
||||||
|
|
||||||
export const sendEmail = async (formData: FormData) => {
|
export const sendEmail = async (formData: FormData) => {
|
||||||
//rate limit
|
//rate limit
|
||||||
|
|
||||||
|
|||||||
@ -31,6 +31,6 @@ export async function POST(request: NextRequest) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function GET(req: NextRequest){
|
// export async function GET(req: NextRequest){
|
||||||
return NextResponse.json({message: 'Hello'})
|
// return NextResponse.json({message: 'Hello'})
|
||||||
}
|
// }
|
||||||
@ -37,7 +37,7 @@ export default function Home() {
|
|||||||
|
|
||||||
// Send new order email to self
|
// Send new order email to self
|
||||||
const clientEmail = formData.get('senderEmail') as string
|
const clientEmail = formData.get('senderEmail') as string
|
||||||
console.log(JSON.stringify({"senderEmail":clientEmail}))
|
// console.log(JSON.stringify({"senderEmail":clientEmail}))
|
||||||
await fetch("/api/emails", {
|
await fetch("/api/emails", {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user