From 46b28db877303e3b4ae27b2c3d4f94f7179960a6 Mon Sep 17 00:00:00 2001 From: Convly Date: Thu, 25 Aug 2022 13:56:24 +0200 Subject: [PATCH] Fix invalid enum value used to assert 'changingTypeToCustom' --- packages/core/admin/server/services/api-token.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/admin/server/services/api-token.js b/packages/core/admin/server/services/api-token.js index 8455753ea2..d89fd00446 100644 --- a/packages/core/admin/server/services/api-token.js +++ b/packages/core/admin/server/services/api-token.js @@ -300,8 +300,8 @@ const update = async (id, attributes) => { } const changingTypeToCustom = - attributes.type === constants.API_TOKEN_TYPE.custom && - originalToken.type !== constants.API_TOKEN_TYPE.custom; + attributes.type === constants.API_TOKEN_TYPE.CUSTOM && + originalToken.type !== constants.API_TOKEN_TYPE.CUSTOM; // if we're updating the permissions on any token type, or changing from non-custom to custom, ensure they're still valid // if neither type nor permissions are changing, we don't need to validate again or else we can't allow partial update