mirror of
https://github.com/EdiFarcas/Car-Fuel-Tracking-App.git
synced 2026-06-28 23:00:52 +03:00
Latest update
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import { NextResponse } from 'next/server';
|
||||
import { prisma } from '@/lib/prisma';
|
||||
|
||||
export async function POST(req: Request) {
|
||||
const { name, email, message } = await req.json();
|
||||
if (!message) return NextResponse.json({ error: 'Message required' }, { status: 400 });
|
||||
const contact = await prisma.contactMessage.create({
|
||||
data: { name, email, message },
|
||||
});
|
||||
return NextResponse.json({ success: true, id: contact.id });
|
||||
}
|
||||
Reference in New Issue
Block a user