Register the mock API for the dev app

Signed-off-by: Karan Shah <karan.shah@simplybusiness.co.uk>
This commit is contained in:
Karan Shah
2022-01-11 09:35:22 +00:00
parent d16c977381
commit 32ab08a4b1
2 changed files with 6 additions and 4 deletions
+6
View File
@@ -24,9 +24,15 @@ import {
Page,
SupportButton,
} from '@backstage/core-components';
import { airbrakeApiRef, MockAirbrakeApi } from '../src/api';
createDevApp()
.registerPlugin(airbrakePlugin)
.registerApi({
api: airbrakeApiRef,
deps: {},
factory: () => new MockAirbrakeApi(),
})
.addPage({
element: (
<Page themeId="tool">
-4
View File
@@ -14,11 +14,9 @@
* limitations under the License.
*/
import {
configApiRef,
createApiFactory,
createPlugin,
discoveryApiRef,
identityApiRef,
} from '@backstage/core-plugin-api';
import { rootRouteRef } from './routes';
@@ -30,9 +28,7 @@ export const airbrakePlugin = createPlugin({
createApiFactory({
api: airbrakeApiRef,
deps: {
configApi: configApiRef,
discoveryApi: discoveryApiRef,
identityApi: identityApiRef,
},
factory: ({ discoveryApi }) => new ProductionAirbrakeApi(discoveryApi),
}),