diff --git a/x-pack/legacy/plugins/siem/public/components/recent_timelines/helpers.ts b/x-pack/legacy/plugins/siem/public/components/recent_timelines/helpers.ts deleted file mode 100644 index 41fa90f1776e65..00000000000000 --- a/x-pack/legacy/plugins/siem/public/components/recent_timelines/helpers.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -import { throwIfNotOk } from '../../hooks/api/api'; -import { KibanaServices } from '../../lib/kibana'; -import { MeApiResponse } from './recent_timelines'; - -export const fetchUsername = async () => { - const response = await KibanaServices.get().http.fetch('/internal/security/me', { - method: 'GET', - credentials: 'same-origin', - asResponse: true, - }); - - await throwIfNotOk(response.response); - return response.body!.username; -}; diff --git a/x-pack/legacy/plugins/siem/public/components/recent_timelines/index.tsx b/x-pack/legacy/plugins/siem/public/components/recent_timelines/index.tsx index 41eb1377429634..6f22287774d7eb 100644 --- a/x-pack/legacy/plugins/siem/public/components/recent_timelines/index.tsx +++ b/x-pack/legacy/plugins/siem/public/components/recent_timelines/index.tsx @@ -22,10 +22,6 @@ import { RecentTimelines } from './recent_timelines'; import * as i18n from './translations'; import { FilterMode } from './types'; -export interface MeApiResponse { - username: string; -} - interface OwnProps { apolloClient: ApolloClient<{}>; filterBy: FilterMode; diff --git a/x-pack/legacy/plugins/siem/public/components/recent_timelines/recent_timelines.tsx b/x-pack/legacy/plugins/siem/public/components/recent_timelines/recent_timelines.tsx index a01cc0fe277aa6..fdd206a33ff7e6 100644 --- a/x-pack/legacy/plugins/siem/public/components/recent_timelines/recent_timelines.tsx +++ b/x-pack/legacy/plugins/siem/public/components/recent_timelines/recent_timelines.tsx @@ -21,10 +21,6 @@ import { WithHoverActions } from '../with_hover_actions'; import { RecentTimelineCounts } from './counts'; import * as i18n from './translations'; -export interface MeApiResponse { - username: string; -} - export const RecentTimelines = React.memo<{ noTimelinesMessage: string; onOpenTimeline: OnOpenTimeline;