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