Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename newsletter as marketing on communication preferences #529

Merged
merged 1 commit into from
Jan 11, 2024
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
8 changes: 4 additions & 4 deletions src/User.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});

Expand Down Expand Up @@ -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,
});
});
Expand Down
2 changes: 1 addition & 1 deletion src/UserService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export interface UserAttributes {
}

export interface UserCommunications {
newsletter?: boolean;
marketing?: boolean;
onboarding?: boolean;
}

Expand Down
Loading