Skip to content

Commit

Permalink
chore: mark feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
remidej committed Apr 4, 2024
1 parent 9b7f779 commit 2db7376
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Core, Modules, UID, Data, Struct } from '@strapi/types';
import type { Core, Modules, UID, Data, Schema } from '@strapi/types';
import { contentTypes } from '@strapi/utils';
import { omit, pick } from 'lodash/fp';

Expand Down Expand Up @@ -280,7 +280,7 @@ const createHistoryService = ({ strapi }: { strapi: Core.Strapi }) => {
*/
const buildRelationReponse = async (
values: EntryToPopulate[],
attributeSchema: Struct.SchemaAttributes[keyof Struct.SchemaAttributes]
attributeSchema: Schema.Attribute.AnyAttribute
): Promise<{ results: any[]; meta: { missingCount: number } }> => {
return (
values
Expand Down Expand Up @@ -311,6 +311,7 @@ const createHistoryService = ({ strapi }: { strapi: Core.Strapi }) => {
.documents(attributeSchema.target)
.findOne(entry.documentId, { locale: entry.locale || undefined });
}
// For media assets, only the id is available, double check that we have it
} else if ('id' in entry) {
relatedEntry = await strapi.db
.query('plugin::upload.file')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ export interface CreateHistoryVersion {
locale: string | null;
status: 'draft' | 'published' | 'modified' | null;
data: Record<string, unknown>;
schema: Schema.Attributes;
componentsSchemas: Record<`${string}.${string}`, Schema.Attributes>;
schema: Struct.SchemaAttributes;
componentsSchemas: Record<`${string}.${string}`, Struct.SchemaAttributes>;
}

interface Locale {
Expand Down

0 comments on commit 2db7376

Please sign in to comment.