diff --git a/docs/local-api/overview.mdx b/docs/local-api/overview.mdx index b43d48f20b..49e0089481 100644 --- a/docs/local-api/overview.mdx +++ b/docs/local-api/overview.mdx @@ -275,7 +275,7 @@ The following Global operations are available through the Local API: ```js // Result will be the Header Global. const result = await payload.findGlobal({ - global: 'header', // required + slug: 'header', // required depth: 2, locale: 'en', fallbackLocale: false, @@ -290,7 +290,7 @@ const result = await payload.findGlobal({ ```js // Result will be the updated Header Global. const result = await payload.updateGlobal({ - global: 'header', // required + slug: 'header', // required data: { // required nav: [ { diff --git a/src/globals/operations/local/findOne.ts b/src/globals/operations/local/findOne.ts index 07e848a2f8..aad5724e8e 100644 --- a/src/globals/operations/local/findOne.ts +++ b/src/globals/operations/local/findOne.ts @@ -1,6 +1,6 @@ async function findOne(options) { const { - global: globalSlug, + slug: globalSlug, depth, locale = this?.config?.localization?.defaultLocale, fallbackLocale = null, diff --git a/src/globals/operations/local/update.ts b/src/globals/operations/local/update.ts index b7c9cbd23d..ac3c64ff4b 100644 --- a/src/globals/operations/local/update.ts +++ b/src/globals/operations/local/update.ts @@ -1,6 +1,6 @@ async function update(options) { const { - global: globalSlug, + slug: globalSlug, depth, locale = this?.config?.localization?.defaultLocale, fallbackLocale = null,