diff --git a/docs/backend-system/core-services/url-reader.md b/docs/backend-system/core-services/url-reader.md index 27b9658eda..242ffd2307 100644 --- a/docs/backend-system/core-services/url-reader.md +++ b/docs/backend-system/core-services/url-reader.md @@ -60,22 +60,16 @@ import { createServiceFactory, UrlReaderService, } from '@backstage/backend-plugin-api'; -import { ScmIntegrations } from '@backstage/integration'; - -type CustomIntegrationConfig = { - // custom config fields -}; +import { Config } from '@backstage/config'; class CustomUrlReader implements UrlReaderService { static factory: ReaderFactory = ({ config, treeResponseFactory }) => { - const integrations = ScmIntegrations.fromConfig(config); - const integrationsConfig = integrations.byHost('myCustomDomain') ?? {}; - const reader = new CustomUrlReader(integrationsConfig); + const reader = new CustomUrlReader(config); const predicate = (url: URL) => url.host === 'myCustomDomain'; return [{ reader, predicate }]; }; - constructor(private readonly integrationConfig: CustomIntegrationConfig) {} + constructor(private readonly config: Config) {} // implementations of read, readTree and search methods skipped for this example }