Inline catalog from options directly in createRouter

Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
This commit is contained in:
Fredrik Adelöw
2026-04-03 22:58:20 +02:00
parent da3f5356ec
commit 7d9d185654
@@ -114,9 +114,9 @@ export async function createRouter(
options: RouterOptions,
): Promise<express.Router> {
const router = Router();
const { publisher, config, logger, discovery, httpAuth, auth } = options;
const { publisher, config, logger, discovery, httpAuth, auth, catalog } =
options;
const catalogClient = options.catalog;
const docsBuildStrategy =
options.docsBuildStrategy ?? DefaultDocsBuildStrategy.fromConfig(config);
const buildLogTransport = options.buildLogTransport;
@@ -125,7 +125,7 @@ export async function createRouter(
// when loading a single techdocs page.
const entityLoader = new CachedEntityLoader({
auth,
catalog: catalogClient,
catalog,
cache: options.cache,
});