MCPcopy Index your code
hub / github.com/directus/directus / getNestedCollectionsToCreate

Function getNestedCollectionsToCreate

api/src/utils/apply-diff.ts:59–62  ·  view source on GitHub ↗
(currentLevelCollection: string)

Source from the content-addressed store, hash-verified

57 const collectionsService = new CollectionsService({ knex: trx, schema });
58
59 const getNestedCollectionsToCreate = (currentLevelCollection: string) =>
60 snapshotDiff.collections.filter(
61 ({ diff }) => (diff[0] as DiffNew<Collection>).rhs?.meta?.group === currentLevelCollection,
62 ) as CollectionDelta[];
63
64 const createCollections = async (collections: CollectionDelta[]) => {
65 for (const { collection, diff } of collections) {

Callers 1

createCollectionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected