Skip to content

Commit

Permalink
Merge pull request #17306 from mozilla/FXA-10027-subplat
Browse files Browse the repository at this point in the history
feat(newsletters): Update default newsletter slug for SubPlat
  • Loading branch information
LZoog authored Jul 31, 2024
2 parents 9618afa + 70fdab3 commit 37d0d7a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/fxa-payments-server/src/lib/newsletter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ describe('lib/newsletter', () => {
it('resolves to undefined on success with default newsletter slug', async () => {
await expect(handleNewsletterSignup()).resolves.toBe(undefined);
expect(apiSignupForNewsletter).toHaveBeenCalledWith({
newsletters: ['mozilla-accounts'],
newsletters: ['mozilla-and-you'],
});
});

Expand Down
2 changes: 1 addition & 1 deletion packages/fxa-payments-server/src/lib/newsletter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import sentry from './sentry';
export const FXA_NEWSLETTER_SIGNUP_ERROR: GeneralError = {
code: 'fxa_newsletter_signup_error',
};
const DEFAULT_NEWSLETTER_SLUG = 'mozilla-accounts';
const DEFAULT_NEWSLETTER_SLUG = 'mozilla-and-you';

export async function handleNewsletterSignup(
productMetadata?: ProductMetadata
Expand Down
2 changes: 1 addition & 1 deletion packages/fxa-shared/subscriptions/validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const subscriptionProductMetadataBaseValidator = Joi.object({
newsletterSlug: commaArray
.optional()
.items(
Joi.valid('mozilla-accounts', 'security-privacy-news', 'hubs', 'mdnplus')
Joi.valid('mozilla-and-you', 'security-privacy-news', 'hubs', 'mdnplus')
),
newsletterLabelTextCode: Joi.string()
.optional()
Expand Down

0 comments on commit 37d0d7a

Please sign in to comment.