diff --git a/src/js/actions/index.test.ts b/src/js/actions/index.test.ts index d15e31661..b9b560755 100644 --- a/src/js/actions/index.test.ts +++ b/src/js/actions/index.test.ts @@ -379,7 +379,7 @@ describe('actions/index.js', () => { // The unsubscribe endpoint call. nock('https://api.github.com/') - .delete(`/notifications/threads/${id}/subscription`) + .put(`/notifications/threads/${id}/subscription`) .reply(204); // The mark read endpoint call. @@ -419,7 +419,7 @@ describe('actions/index.js', () => { const message = 'Oops! Something went wrong.'; nock('https://api.github.com/') - .delete(`/notifications/threads/${id}/subscription`) + .put(`/notifications/threads/${id}/subscription`) .reply(400, { message }); const expectedActions = [ diff --git a/src/js/actions/index.ts b/src/js/actions/index.ts index aabee3c01..e64ac5f4b 100644 --- a/src/js/actions/index.ts +++ b/src/js/actions/index.ts @@ -181,7 +181,7 @@ export function unsubscribeNotification(id, hostname) { dispatch({ type: UNSUBSCRIBE_NOTIFICATION.REQUEST }); - return apiRequestAuth(unsubscribeURL, Methods.DELETE, token, {}) + return apiRequestAuth(unsubscribeURL, Methods.PUT, token, { ignore: true }) .then((response) => { // The GitHub notifications API doesn't automatically mark things as read // like it does in the UI, so after unsubscribing we also need to hit the