From 0e23eee6e6d3d16c44be8cc6c86338d517220e7b Mon Sep 17 00:00:00 2001 From: Steve Larson <9larsons@gmail.com> Date: Sat, 23 Nov 2024 19:06:04 -0600 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fixed=20unsubscribe=20all=20link?= =?UTF-8?q?=20in=20Portal=20sometimes=20failing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- apps/portal/src/components/pages/UnsubscribePage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/portal/src/components/pages/UnsubscribePage.js b/apps/portal/src/components/pages/UnsubscribePage.js index 8717509a21a9..7377864fcc10 100644 --- a/apps/portal/src/components/pages/UnsubscribePage.js +++ b/apps/portal/src/components/pages/UnsubscribePage.js @@ -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);