feat(core-api/Storage): Made the implementation a litle nicer now so that the error API is passed through to the storage API

This commit is contained in:
blam
2020-06-03 21:25:51 +02:00
parent e37ad442e2
commit 0e5d0ea7e1
5 changed files with 65 additions and 17 deletions
+7 -1
View File
@@ -30,6 +30,8 @@ import {
OAuthRequestManager,
googleAuthApiRef,
githubAuthApiRef,
storageApiRef,
WebStorage,
} from '@backstage/core';
import {
@@ -45,8 +47,12 @@ import { catalogApiRef, CatalogClient } from '@backstage/plugin-catalog';
const builder = ApiRegistry.builder();
const alertApi = builder.add(alertApiRef, new AlertApiForwarder());
const errorApi = builder.add(
errorApiRef,
new ErrorAlerter(alertApi, new ErrorApiForwarder()),
);
builder.add(errorApiRef, new ErrorAlerter(alertApi, new ErrorApiForwarder()));
builder.add(storageApiRef, WebStorage.create({ errorApi }));
builder.add(circleCIApiRef, new CircleCIApi());
builder.add(featureFlagsApiRef, new FeatureFlags());