Skip to content

Commit 403f654

Browse files
authored
Use propert endpoint (#28)
* v1.0.0 * Use propert endpoint for unsubscribing
1 parent d8465e8 commit 403f654

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/api/notifications.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,7 @@ export function markNotificationAsRead(id: Thread['id'], accessToken: NonNullabl
171171
}
172172

173173
export function unsubscribeNotification(id: Thread['id'], accessToken: NonNullable<AppStorageContext['accessToken']>) {
174-
return redaxios.put(`https://api.github.com/notifications/threads/${id}/subscription`, null, {
174+
return redaxios.delete(`https://api.github.com/notifications/threads/${id}/subscription`, {
175175
headers: createBaseGithubApiHeaders(accessToken),
176-
body: {
177-
ignored: true,
178-
},
179176
})
180177
}

0 commit comments

Comments
 (0)