From 8ea4b036ab5aa283da5ce35da287b2db34599f48 Mon Sep 17 00:00:00 2001 From: Lauri Nevala Date: Thu, 11 Jan 2024 12:17:36 +0200 Subject: [PATCH] Rename newsletter as marketing on cummunication preferences --- src/User.test.ts | 8 ++++---- src/UserService.ts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/User.test.ts b/src/User.test.ts index 4f6159c3..bf4b6359 100644 --- a/src/User.test.ts +++ b/src/User.test.ts @@ -30,12 +30,12 @@ describe(".user.*", () => { nock(apiEndpointAddress).put(`/users/${username}/reset-password`).reply(204); nock(apiEndpointAddress).get(`/users/${username}/communications`).reply(200, { - newsletter: false, + marketing: false, onboarding: false, }); nock(apiEndpointAddress).patch(`/users/${username}/communications`).reply(200, { - newsletter: true, + marketing: true, onboarding: false, }); @@ -72,12 +72,12 @@ describe(".user.*", () => { it("can call getUserCommunicationPreferences", async () => { const pref = await lensPlatformClient.user.getUserCommunicationsPreferences(); - expect(pref.newsletter).toBeFalsy(); + expect(pref.marketing).toBeFalsy(); }); it("can call updateUserCommunicationsPreferences", async () => { await lensPlatformClient.user.updateUserCommunicationsPreferences({ - newsletter: true, + marketing: true, onboarding: false, }); }); diff --git a/src/UserService.ts b/src/UserService.ts index d6fbd5b0..4950b92a 100644 --- a/src/UserService.ts +++ b/src/UserService.ts @@ -53,7 +53,7 @@ export interface UserAttributes { } export interface UserCommunications { - newsletter?: boolean; + marketing?: boolean; onboarding?: boolean; }