diff --git a/frontend/kolide/base.js b/frontend/kolide/base.js index 35f3723685..d7fd92dd45 100644 --- a/frontend/kolide/base.js +++ b/frontend/kolide/base.js @@ -20,7 +20,7 @@ class Base { static _request (method, endpoint, body, overrideHeaders) { const credentials = 'same-origin'; - const { DELETE, GET } = REQUEST_METHODS; + const { GET } = REQUEST_METHODS; const headers = { Accept: 'application/json', 'Content-Type': 'application/json', @@ -32,8 +32,6 @@ class Base { return fetch(endpoint, requestAttrs) .then((response) => { - if (method === DELETE) return false; - return response.json() .then((jsonResponse) => { if (response.ok) { diff --git a/frontend/pages/Admin/UserManagementPage/UserManagementPage.jsx b/frontend/pages/Admin/UserManagementPage/UserManagementPage.jsx index 5201ecc6b5..acc3f6d3ae 100644 --- a/frontend/pages/Admin/UserManagementPage/UserManagementPage.jsx +++ b/frontend/pages/Admin/UserManagementPage/UserManagementPage.jsx @@ -85,9 +85,8 @@ class UserManagementPage extends Component { }); case 'revert_invitation': return dispatch(inviteActions.destroy(user)) - .then(() => { - return dispatch(renderFlash('success', 'Invite revoked')); - }); + .then(() => dispatch(renderFlash('success', 'Invite revoked'))) + .catch(() => dispatch(renderFlash('error', 'Invite could not be revoked'))); default: return false; } diff --git a/frontend/test/mocks.js b/frontend/test/mocks.js index e07db94a10..54fc6a9d3d 100644 --- a/frontend/test/mocks.js +++ b/frontend/test/mocks.js @@ -265,7 +265,7 @@ export const validRevokeInviteRequest = (bearerToken, inviteID) => { }, }) .delete(`/api/v1/kolide/invites/${inviteID}`) - .reply(200); + .reply(200, {}); }; export const invalidResetPasswordRequest = (password, token, error) => {