Skip to content

Commit

Permalink
Fix the API provided by unprocessed entities
Browse files Browse the repository at this point in the history
  • Loading branch information
taras committed Apr 22, 2024
1 parent 8b2a949 commit 39c37e4
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions packages/backend/src/plugins/catalog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import { PluginEnvironment } from '../types';
export default async function createPlugin(
env: PluginEnvironment,
): Promise<Router> {
const { discovery, permissions } = env;

const builder = CatalogBuilder.create(env);

// incremental builder receives builder because it'll register
Expand All @@ -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();

Expand Down

0 comments on commit 39c37e4

Please sign in to comment.