🐛 Fixed unsubscribe all link in Portal sometimes failing (#21703)

ref https://linear.app/ghost/issue/ONC-613/

A little while back we changed to requiring a key when interacting with
member endpoints that are not authenticated. One request code path in
Portal was missed, causing some requests to fail. This should patch that
hole.
This commit is contained in:
Steve Larson 2024-11-23 19:10:25 -06:00 committed by GitHub
parent 588979e62f
commit 673e316580
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -87,7 +87,7 @@ export default function UnsubscribePage() {
updatedMember.newsletters = [];
updatedMember.enable_comment_notifications = false;
} else {
updatedMember = await api.member.updateNewsletters({uuid: pageData.uuid, newsletters: [], enableCommentNotifications: false});
updatedMember = await api.member.updateNewsletters({uuid: pageData.uuid, key: pageData.key, newsletters: [], enableCommentNotifications: false});
}
setSubscribedNewsletters([]);
setMember(updatedMember);