Files
2026-09-06 00:14:09 +03:30

19 lines
522 B
JavaScript

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 });
}
}