diff --git a/x-pack/plugins/beats_management/index.ts b/x-pack/plugins/beats_management/index.ts index 3355bc9881811..0bb39d43db1c5 100644 --- a/x-pack/plugins/beats_management/index.ts +++ b/x-pack/plugins/beats_management/index.ts @@ -35,8 +35,8 @@ export function beats(kibana: any) { }, config: () => config, configPrefix: CONFIG_PREFIX, - init(server: KibanaLegacyServer) { - initServerWithKibana(server); + async init(server: KibanaLegacyServer) { + await initServerWithKibana(server); }, }); } diff --git a/x-pack/plugins/beats_management/server/kibana.index.ts b/x-pack/plugins/beats_management/server/kibana.index.ts index dd7bc443bc603..73a1e80e24c3b 100644 --- a/x-pack/plugins/beats_management/server/kibana.index.ts +++ b/x-pack/plugins/beats_management/server/kibana.index.ts @@ -7,7 +7,7 @@ import { compose } from './lib/compose/kibana'; import { initManagementServer } from './management_server'; -export const initServerWithKibana = (hapiServer: any) => { +export const initServerWithKibana = async (hapiServer: any) => { const libs = compose(hapiServer); - initManagementServer(libs); + await initManagementServer(libs); };