From 13fd9e39ea92a53169f2664c0bbfc2e98ebbcc6c Mon Sep 17 00:00:00 2001 From: Oliver Gupte Date: Thu, 6 Aug 2020 01:12:48 -0700 Subject: [PATCH] Observability Overview fix extra basepath prepend for alerting fetch (#74465) --- .../public/services/get_observability_alerts.ts | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/x-pack/plugins/observability/public/services/get_observability_alerts.ts b/x-pack/plugins/observability/public/services/get_observability_alerts.ts index 602e4cf2bdd13e..cff6726e47df98 100644 --- a/x-pack/plugins/observability/public/services/get_observability_alerts.ts +++ b/x-pack/plugins/observability/public/services/get_observability_alerts.ts @@ -11,15 +11,12 @@ const allowedConsumers = ['apm', 'uptime', 'logs', 'metrics', 'alerts']; export async function getObservabilityAlerts({ core }: { core: AppMountContext['core'] }) { try { - const { data = [] }: { data: Alert[] } = await core.http.get( - core.http.basePath.prepend('/api/alerts/_find'), - { - query: { - page: 1, - per_page: 20, - }, - } - ); + const { data = [] }: { data: Alert[] } = await core.http.get('/api/alerts/_find', { + query: { + page: 1, + per_page: 20, + }, + }); return data.filter(({ consumer }) => allowedConsumers.includes(consumer)); } catch (e) {