revert: drop visitor CTA button and public visit endpoint
Some checks failed
Build and Push Docker Image / build-and-push (push) Has been cancelled

This commit is contained in:
belisards
2026-05-03 17:15:20 -03:00
parent 17117ed7b2
commit 31c912fc3d
2 changed files with 1 additions and 24 deletions

View File

@@ -1,12 +0,0 @@
import { NextRequest, NextResponse } from 'next/server';
import { db, guests } from '@/lib/db';
import { USR_COOKIE, buildCookie, isSecureCookie } from '@/lib/auth/cookies';
const ONE_YEAR = 60 * 60 * 24 * 365;
export async function POST(request: NextRequest) {
const [row] = await db.insert(guests).values({ name: 'Visitante' }).returning();
const headers = new Headers();
headers.append('Set-Cookie', buildCookie(USR_COOKIE, row.id, isSecureCookie(request), ONE_YEAR));
return NextResponse.json({ success: true, guestId: row.id }, { headers });
}