bedrock icon indicating copy to clipboard operation
bedrock copied to clipboard

Newsletters should post directly to basket

Open alexgibson opened this issue 1 year ago • 1 comments

Description

Currently all newsletter forms post to /newsletter. In an effort to lighten the load on bedrock, we'd like to switch these over to post to basket directly instead.

Endpoint: https://basket.mozilla.org/news/subscribe/ Docs: https://basket.readthedocs.io/newsletter_api.html#news-subscribe


Success Criteria

  • [ ] Newsletter forms post / interact directly with basket

alexgibson avatar Jul 19 '22 15:07 alexgibson

Issue worth flagging:

The VPN wait list newsletter is currently marked as private and so needs an API key to POST to it, which is something we shouldn't really do using client side code.

Possible solutions:

  1. Form can check if a newsletter is marked as private. If true, POST to bedrock. If false, POST to Basket.
  2. We remove the private checkbox from the VPN wait list newsletter (it's the same as any of our other newsletters, so doesn't really need to be private?)

alexgibson avatar Jul 20 '22 14:07 alexgibson

Additional note: we'll need to keep the backend /newsletter/ URL that you can POST to, since at least for now there may be external sites still using that URL.

alexgibson avatar Aug 30 '22 09:08 alexgibson