Really test out the key
This commit is contained in:
parent
c040a5c425
commit
d1b8f16261
1 changed files with 5 additions and 3 deletions
|
|
@ -8,10 +8,12 @@ import { nanoid } from '@/lib/utils'
|
|||
export const runtime = 'edge'
|
||||
|
||||
export async function POST(req: Request) {
|
||||
if (process.env.VERCEL_ENV !== 'preview') {
|
||||
const session = await auth()
|
||||
if (session == null) {
|
||||
return new Response('Unauthorized', { status: 401 })
|
||||
}
|
||||
}
|
||||
|
||||
const json = await req.json()
|
||||
const { messages, previewToken } = json
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue