mirror of
https://github.com/strapi/strapi.git
synced 2025-11-01 10:23:34 +00:00
fix(history): update type (#19878)
This commit is contained in:
parent
c4ec62a341
commit
c184e9d81f
@ -1,5 +1,5 @@
|
||||
import { difference, omit } from 'lodash/fp';
|
||||
import { Schema } from '@strapi/types';
|
||||
import type { Struct } from '@strapi/types';
|
||||
import { CreateHistoryVersion } from '../../../../shared/contracts/history-versions';
|
||||
import { FIELDS_TO_IGNORE } from '../constants';
|
||||
|
||||
@ -9,13 +9,10 @@ import { FIELDS_TO_IGNORE } from '../constants';
|
||||
*/
|
||||
export const getSchemaAttributesDiff = (
|
||||
versionSchemaAttributes: CreateHistoryVersion['schema'],
|
||||
contentTypeSchemaAttributes: Schema.Attributes
|
||||
contentTypeSchemaAttributes: Struct.SchemaAttributes
|
||||
) => {
|
||||
// Omit the same fields that were omitted when creating a history version
|
||||
const sanitizedContentTypeSchemaAttributes = omit(
|
||||
FIELDS_TO_IGNORE,
|
||||
contentTypeSchemaAttributes
|
||||
) as CreateHistoryVersion['schema'];
|
||||
const sanitizedContentTypeSchemaAttributes = omit(FIELDS_TO_IGNORE, contentTypeSchemaAttributes);
|
||||
|
||||
const reduceDifferenceToAttributesObject = (
|
||||
diffKeys: string[],
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user