Refactor selectedSchema naming

This commit is contained in:
Christian Capeans 2022-11-15 14:17:10 +01:00
parent a9d20f759b
commit ec2c6178f4
2 changed files with 2 additions and 16 deletions

View File

@ -81,20 +81,6 @@ class LocalStrapiSourceProvider implements ISourceProvider {
throw new Error('Not able to get Schemas. Strapi instance not found');
}
const selectedKeys = [
'collectionName',
'info',
'options',
'pluginOptions',
'attributes',
'kind',
'modelType',
'modelName',
'uid',
'plugin',
'globalId',
];
const schemas = {
...this.strapi.contentTypes,
...this.strapi.components,

View File

@ -94,7 +94,7 @@ export const jsonDiffs = (a: unknown, b: unknown, ctx: Context = createContext()
return diffs;
};
const selectedKeys = [
const schemaSelectedKeys = [
'collectionName',
'info',
'options',
@ -108,4 +108,4 @@ const selectedKeys = [
'globalId',
];
export const mapSchemasValues = (schemas: any) => mapValues(pick(selectedKeys), schemas);
export const mapSchemasValues = (schemas: any) => mapValues(pick(schemaSelectedKeys), schemas);