Initial ASPHP website
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import { NextResponse } from "next/server";
|
||||
import { submitContact } from "../../meshkee";
|
||||
|
||||
export async function POST(request) {
|
||||
try {
|
||||
const body = await request.json();
|
||||
const data = await submitContact({
|
||||
title: body.title,
|
||||
name: body.name,
|
||||
cellNumber: body.cellNumber,
|
||||
email: body.email,
|
||||
text: body.text
|
||||
});
|
||||
return NextResponse.json(data, { status: 201 });
|
||||
} catch (error) {
|
||||
return NextResponse.json({ message: "Contact submission failed" }, { status: 502 });
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user