diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 34190b803a..4d2d3641ac 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -250,7 +250,7 @@ jobs: suite: - _community - access-control - # - admin + - admin - auth - email - field-error-states diff --git a/app/(payload)/admin/[[...segments]]/not-found.tsx b/app/(payload)/admin/[[...segments]]/not-found.tsx index f3a7743293..8b7a445fe7 100644 --- a/app/(payload)/admin/[[...segments]]/not-found.tsx +++ b/app/(payload)/admin/[[...segments]]/not-found.tsx @@ -14,8 +14,8 @@ type Args = { } } -export const generateMetadata = ({ params, searchParams }: Args): Promise => - generatePageMetadata({ config, params, searchParams }) +export const generateMetadata = ({ params }: Args): Promise => + generatePageMetadata({ config, params }) const NotFound = ({ params, searchParams }: Args) => NotFoundPage({ config, params, searchParams }) diff --git a/app/live-preview/_api/fetchDoc.ts b/app/live-preview/_api/fetchDoc.ts deleted file mode 100644 index d1dc1c2a3a..0000000000 --- a/app/live-preview/_api/fetchDoc.ts +++ /dev/null @@ -1,35 +0,0 @@ -import QueryString from 'qs' - -import { PAYLOAD_SERVER_URL } from './serverURL.js' - -export const fetchDoc = async (args: { - collection: string - depth?: number - id?: string - slug?: string -}): Promise => { - const { id, slug, collection, depth = 2 } = args || {} - - const queryString = QueryString.stringify( - { - ...(slug ? { 'where[slug][equals]': slug } : {}), - ...(depth ? { depth } : {}), - }, - { addQueryPrefix: true }, - ) - - const doc: T = await fetch(`${PAYLOAD_SERVER_URL}/api/${collection}${queryString}`, { - cache: 'no-store', - headers: { - 'Content-Type': 'application/json', - }, - method: 'GET', - }) - ?.then((res) => res.json()) - ?.then((res) => { - if (res.errors) throw new Error(res?.errors?.[0]?.message ?? 'Error fetching doc') - return res?.docs?.[0] - }) - - return doc -} diff --git a/app/live-preview/_api/fetchDocs.ts b/app/live-preview/_api/fetchDocs.ts deleted file mode 100644 index 104f5e2586..0000000000 --- a/app/live-preview/_api/fetchDocs.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { PAYLOAD_SERVER_URL } from './serverURL.js' - -export const fetchDocs = async (collection: string): Promise => { - const docs: T[] = await fetch(`${PAYLOAD_SERVER_URL}/api/${collection}?depth=0&limit=100`, { - cache: 'no-store', - headers: { - 'Content-Type': 'application/json', - }, - method: 'GET', - }) - ?.then((res) => res.json()) - ?.then((res) => { - if (res.errors) throw new Error(res?.errors?.[0]?.message ?? 'Error fetching docs') - - return res?.docs - }) - - return docs -} diff --git a/app/live-preview/_api/fetchFooter.ts b/app/live-preview/_api/fetchFooter.ts deleted file mode 100644 index 26b531b620..0000000000 --- a/app/live-preview/_api/fetchFooter.ts +++ /dev/null @@ -1,25 +0,0 @@ -import type { Footer } from '../../../test/live-preview/payload-types.js' - -import { PAYLOAD_SERVER_URL } from './serverURL.js' - -export async function fetchFooter(): Promise