From 4359a70a8b0bca380cc513dfcb83b2fbe28cbef4 Mon Sep 17 00:00:00 2001 From: James Date: Sun, 18 Apr 2021 20:58:33 -0400 Subject: [PATCH] fix: ensures api keys are properly populated in admin --- demo/collections/LocalOperations.ts | 2 +- src/fields/baseFields/baseAPIKeyFields.ts | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/demo/collections/LocalOperations.ts b/demo/collections/LocalOperations.ts index b8570baea9..85fa205e59 100644 --- a/demo/collections/LocalOperations.ts +++ b/demo/collections/LocalOperations.ts @@ -15,7 +15,7 @@ const LocalOperations: PayloadCollectionConfig = { }); const blocksGlobal = await req.payload.findGlobal({ - global: 'blocks-global', + slug: 'blocks-global', }); formattedData.localizedPosts = localizedPosts; diff --git a/src/fields/baseFields/baseAPIKeyFields.ts b/src/fields/baseFields/baseAPIKeyFields.ts index e5448feae0..9c96342480 100644 --- a/src/fields/baseFields/baseAPIKeyFields.ts +++ b/src/fields/baseFields/baseAPIKeyFields.ts @@ -10,14 +10,18 @@ export default [ type: 'checkbox', defaultValue: false, admin: { - disabled: true, + components: { + Field: () => null, + }, }, }, { name: 'apiKey', type: 'text', admin: { - disabled: true, + components: { + Field: () => null, + }, }, hooks: { beforeChange: [