Skip to content

Commit

Permalink
Remove UserAPIClient from ui_api
Browse files Browse the repository at this point in the history
It's not needed anymore since the components are initiated with this prop already passed
  • Loading branch information
yakhinvadim committed Jun 8, 2021
1 parent 9f18ea9 commit 706ac2e
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 5 deletions.
1 change: 0 additions & 1 deletion x-pack/plugins/security/public/plugin.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ describe('Security Plugin', () => {
})
).toEqual({
uiApi: {
UserAPIClient: expect.any(Function),
components: {
getChangePassword: expect.any(Function),
getPersonalInfo: expect.any(Function),
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/security/public/ui_api/index.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,5 @@ export const getUiApiMock = {
getPersonalInfo: jest.fn(),
getChangePassword: jest.fn(),
},
UserAPIClient: jest.fn(),
}),
};
3 changes: 0 additions & 3 deletions x-pack/plugins/security/public/ui_api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import type { CoreStart } from 'src/core/public';

import type { ChangePasswordProps } from '../account_management/change_password';
import type { PersonalInfoProps } from '../account_management/personal_info';
import { UserAPIClient } from '../management';
import { getComponents } from './components';

interface GetUiApiOptions {
Expand All @@ -25,14 +24,12 @@ export interface UiApi {
getPersonalInfo: LazyComponentFn<PersonalInfoProps>;
getChangePassword: LazyComponentFn<Pick<ChangePasswordProps, 'user'>>;
};
UserAPIClient: typeof UserAPIClient;
}

export const getUiApi = ({ core }: GetUiApiOptions): UiApi => {
const components = getComponents({ core });

return {
components,
UserAPIClient,
};
};

0 comments on commit 706ac2e

Please sign in to comment.