Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ESSNTL-4486): Update API functions names #1858

Merged
merged 2 commits into from
May 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/routes/InventoryTable.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ describe('InventoryTable', () => {

window.XMLHttpRequest = jest.fn().mockImplementation(createXhrMock());

hosts.apiHostDeleteById = jest.fn().mockImplementation(() => Promise.resolve());
hosts.apiHostDeleteHostById = jest.fn().mockImplementation(() => Promise.resolve());
const selected = new Map();
selected.set(system1.id, system1);

Expand Down
2 changes: 1 addition & 1 deletion src/store/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export * from './inventory-actions';

export const deleteEntity = (systems, displayName) => ({
type: ACTION_TYPES.REMOVE_ENTITY,
payload: hosts.apiHostDeleteById(systems),
payload: hosts.apiHostDeleteHostById(systems),
meta: {
notifications: {
fulfilled: {
Expand Down
6 changes: 3 additions & 3 deletions src/store/inventory-actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export const systemProfile = (itemId) => ({

export const editDisplayName = (id, value) => ({
type: ACTION_TYPES.SET_DISPLAY_NAME,
payload: hosts.apiHostPatchHost(id, { display_name: value }), // eslint-disable-line camelcase
payload: hosts.apiHostPatchHostById(id, { display_name: value }), // eslint-disable-line camelcase
meta: {
notifications: {
fulfilled: {
Expand All @@ -144,7 +144,7 @@ export const editDisplayName = (id, value) => ({

export const editAnsibleHost = (id, value) => ({
type: ACTION_TYPES.SET_ANSIBLE_HOST,
payload: hosts.apiHostPatchHost(id, { ansible_host: value }), // eslint-disable-line camelcase
payload: hosts.apiHostPatchHostById(id, { ansible_host: value }), // eslint-disable-line camelcase
meta: {
notifications: {
fulfilled: {
Expand Down Expand Up @@ -193,7 +193,7 @@ export const fetchOperatingSystems = (params = []) => ({

export const deleteEntity = (systems, displayName) => ({
type: ACTION_TYPES.REMOVE_ENTITY,
payload: hosts.apiHostDeleteById(systems),
payload: hosts.apiHostDeleteHostById(systems),
meta: {
notifications: {
fulfilled: {
Expand Down