From 39c37e4d540a4c881807825a681abd6cfeffe3f6 Mon Sep 17 00:00:00 2001 From: Taras Mankovski Date: Mon, 22 Apr 2024 14:36:53 -0400 Subject: [PATCH] Fix the API provided by unprocessed entities --- packages/backend/src/plugins/catalog.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/backend/src/plugins/catalog.ts b/packages/backend/src/plugins/catalog.ts index a24961fbb8..f4a04cc771 100644 --- a/packages/backend/src/plugins/catalog.ts +++ b/packages/backend/src/plugins/catalog.ts @@ -8,6 +8,8 @@ import { PluginEnvironment } from '../types'; export default async function createPlugin( env: PluginEnvironment, ): Promise { + const { discovery, permissions } = env; + const builder = CatalogBuilder.create(env); // incremental builder receives builder because it'll register @@ -25,10 +27,12 @@ export default async function createPlugin( // before incremental builder migrations are executed await incrementalBuilder.build(); - const unprocessed = new UnprocessedEntitiesModule( - await env.database.getClient(), + const unprocessed = UnprocessedEntitiesModule.create({ + database: await env.database.getClient(), router, - ); + discovery, + permissions, + }); unprocessed.registerRoutes();