Skip to content
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
4 changes: 2 additions & 2 deletions src/js/actions/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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 = [
Expand Down
2 changes: 1 addition & 1 deletion src/js/actions/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down