From 75c4f978897a7c7e021d93d4f75df4222a411ec9 Mon Sep 17 00:00:00 2001 From: Boaz Poolman Date: Sat, 27 Mar 2021 16:20:37 +0100 Subject: [PATCH] Remove id from role-permissions config --- services/role-permissions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/role-permissions.js b/services/role-permissions.js index 406899a..5753efc 100644 --- a/services/role-permissions.js +++ b/services/role-permissions.js @@ -33,7 +33,7 @@ module.exports = { }) ); - await Promise.all(sanitizedRolesArray.map(async (config) => { + await Promise.all(sanitizedRolesArray.map(async ({id, ...config}) => { // Check if the config should be excluded. const shouldExclude = strapi.plugins['config-sync'].config.exclude.includes(`${configPrefix}.${config.type}`); if (shouldExclude) return; @@ -97,7 +97,7 @@ module.exports = { let configs = {}; - Object.values(sanitizedRolesArray).map((config) => { + Object.values(sanitizedRolesArray).map(({ id, ...config }) => { // Check if the config should be excluded. const shouldExclude = strapi.plugins['config-sync'].config.exclude.includes(`${configPrefix}.${config.type}`); if (shouldExclude) return;