File tree Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Original file line number Diff line number Diff line change 1
1
import { NextRequest } from "next/server" ;
2
2
import { z } from "zod" ;
3
- import { connectToDatabase } from "@lib" ;
4
3
import { logger , sendMail } from "@lib" ;
5
4
import { ServerResponse } from "@helpers" ;
6
5
import ContactEmail from "@emails/ContactEmail" ;
@@ -14,8 +13,6 @@ const ContactEmailSchema = z.object({
14
13
} ) ;
15
14
16
15
export const POST = async ( request : NextRequest ) => {
17
- await connectToDatabase ( ) ;
18
-
19
16
const body = await request . json ( ) ;
20
17
21
18
const { name, email_address, message } = structuredClone ( body ) ;
@@ -41,7 +38,7 @@ export const POST = async (request: NextRequest) => {
41
38
return ServerResponse . success ( "Successfully sent message." ) ;
42
39
} catch ( e ) {
43
40
logger . error ( e ) ;
44
-
41
+ console . log ( e )
45
42
return ServerResponse . serverError ( ) ;
46
43
}
47
44
} else {
You can’t perform that action at this time.
0 commit comments