bedrock
bedrock copied to clipboard
Newsletters should post directly to basket
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
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:
- Form can check if a newsletter is marked as private. If true, POST to bedrock. If false, POST to Basket.
- 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?)
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.