Register the mock API for the dev app
Signed-off-by: Karan Shah <karan.shah@simplybusiness.co.uk>
This commit is contained in:
@@ -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">
|
||||
|
||||
@@ -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),
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user