diff --git a/examples/draft-preview/src/app/(app)/next/preview/route.ts b/examples/draft-preview/src/app/(app)/next/preview/route.ts index da133e64d9d..5716aa7a423 100644 --- a/examples/draft-preview/src/app/(app)/next/preview/route.ts +++ b/examples/draft-preview/src/app/(app)/next/preview/route.ts @@ -6,7 +6,6 @@ import { getPayload } from 'payload' import configPromise from '../../../../payload.config' -const payloadToken = 'payload-token' export async function GET( req: { @@ -18,7 +17,6 @@ export async function GET( } & Request, ): Promise { const payload = await getPayload({ config: configPromise }) - const token = req.cookies.get(payloadToken)?.value const { searchParams } = new URL(req.url) const path = searchParams.get('path') const collection = searchParams.get('collection') as CollectionSlug diff --git a/templates/website/src/app/(frontend)/next/preview/route.ts b/templates/website/src/app/(frontend)/next/preview/route.ts index 80642637c05..e927d4c5501 100644 --- a/templates/website/src/app/(frontend)/next/preview/route.ts +++ b/templates/website/src/app/(frontend)/next/preview/route.ts @@ -4,7 +4,6 @@ import { getPayload, type PayloadRequest } from 'payload' import configPromise from '@payload-config' import { CollectionSlug } from 'payload' -const payloadToken = 'payload-token' export async function GET( req: Request & { @@ -16,7 +15,6 @@ export async function GET( }, ): Promise { const payload = await getPayload({ config: configPromise }) - const token = req.cookies.get(payloadToken)?.value const { searchParams } = new URL(req.url) const path = searchParams.get('path') const collection = searchParams.get('collection') as CollectionSlug diff --git a/templates/with-vercel-website/src/app/(frontend)/next/preview/route.ts b/templates/with-vercel-website/src/app/(frontend)/next/preview/route.ts index 80642637c05..e927d4c5501 100644 --- a/templates/with-vercel-website/src/app/(frontend)/next/preview/route.ts +++ b/templates/with-vercel-website/src/app/(frontend)/next/preview/route.ts @@ -4,7 +4,6 @@ import { getPayload, type PayloadRequest } from 'payload' import configPromise from '@payload-config' import { CollectionSlug } from 'payload' -const payloadToken = 'payload-token' export async function GET( req: Request & { @@ -16,7 +15,6 @@ export async function GET( }, ): Promise { const payload = await getPayload({ config: configPromise }) - const token = req.cookies.get(payloadToken)?.value const { searchParams } = new URL(req.url) const path = searchParams.get('path') const collection = searchParams.get('collection') as CollectionSlug