Skip to content

Commit

Permalink
fix: Remove unused token variable
Browse files Browse the repository at this point in the history
The `token` variable is not in use and is a leftover from commit `d8c106cb2b8fa157d2ea545991abd1d851a733ec`.
  • Loading branch information
kasperbirch1 committed Jan 2, 2025
1 parent b0ebd92 commit eaa2b56
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 6 deletions.
2 changes: 0 additions & 2 deletions examples/draft-preview/src/app/(app)/next/preview/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { getPayload } from 'payload'

import configPromise from '../../../../payload.config'

const payloadToken = 'payload-token'

export async function GET(
req: {
Expand All @@ -18,7 +17,6 @@ export async function GET(
} & Request,
): Promise<Response> {
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
Expand Down
2 changes: 0 additions & 2 deletions templates/website/src/app/(frontend)/next/preview/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 & {
Expand All @@ -16,7 +15,6 @@ export async function GET(
},
): Promise<Response> {
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 & {
Expand All @@ -16,7 +15,6 @@ export async function GET(
},
): Promise<Response> {
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
Expand Down

0 comments on commit eaa2b56

Please sign in to comment.