Initial commit for wedding-planner MVP

This commit is contained in:
2025-06-23 10:20:37 -04:00
commit bbe5eb0ccd
37 changed files with 5650 additions and 0 deletions

20
app/api/events/route.ts Normal file
View File

@@ -0,0 +1,20 @@
import { auth } from '@/lib/auth';
import { mutations } from '@/lib/mutations';
import { NextRequest, NextResponse } from 'next/server';
export async function POST(req: NextRequest) {
const session = await auth();
if (!session?.user) return new NextResponse('Unauthorized', { status: 401 });
const body = await req.json();
const { name, date, location } = body;
const event = await mutations.createEvent({
name,
date,
location,
creatorId: session.user.id,
});
return NextResponse.json(event)
}