diff --git a/app/api/chat/route.ts b/app/api/chat/route.ts index 3a9f472..b39b26c 100644 --- a/app/api/chat/route.ts +++ b/app/api/chat/route.ts @@ -18,7 +18,7 @@ export async function POST(req: Request) { const { messages, previewToken } = json const session = await auth() - if (process.env.VERCEL_ENV !== 'preview') { + if (process.env.VERCEL_ENV === 'preview') { if (session == null) { return new Response('Unauthorized', { status: 401 }) }