feat(ui): hide spoiler banner, anonymize claims, optional guest name, list wishlists on home, drop esgotados toggle

This commit is contained in:
belisards
2026-05-03 16:53:48 -03:00
parent ce7731cebb
commit c959cc8829
6 changed files with 43 additions and 65 deletions

View File

@@ -16,10 +16,7 @@ export async function POST(request: NextRequest) {
return NextResponse.json({ error: 'Unauthorized' }, { status: 401 });
}
const body = await request.json().catch(() => ({}));
const name = (body?.name ?? '').toString().trim();
if (!name) {
return NextResponse.json({ error: 'name is required' }, { status: 400 });
}
const name = (body?.name ?? '').toString().trim() || 'Convidado';
const [row] = await db.insert(guests).values({ name }).returning();
return NextResponse.json({ success: true, guest: row }, { status: 201 });
}