Skip to content

Commit 4bd2f3c

Browse files
committed
fix(console): added console log to api route
1 parent db5c870 commit 4bd2f3c

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/app/api/contact/route.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { NextRequest } from "next/server";
22
import { z } from "zod";
3-
import { connectToDatabase } from "@lib";
43
import { logger, sendMail } from "@lib";
54
import { ServerResponse } from "@helpers";
65
import ContactEmail from "@emails/ContactEmail";
@@ -14,8 +13,6 @@ const ContactEmailSchema = z.object({
1413
});
1514

1615
export const POST = async (request: NextRequest) => {
17-
await connectToDatabase();
18-
1916
const body = await request.json();
2017

2118
const { name, email_address, message } = structuredClone(body);
@@ -41,7 +38,7 @@ export const POST = async (request: NextRequest) => {
4138
return ServerResponse.success("Successfully sent message.");
4239
} catch (e) {
4340
logger.error(e);
44-
41+
console.log(e)
4542
return ServerResponse.serverError();
4643
}
4744
} else {

0 commit comments

Comments
 (0)