0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00
ghost/test
Kevin Ansfield 27337e5f00
Added newsletter param to email preview endpoint (#14820)
refs https://github.com/TryGhost/Team/issues/1621

We want to allow previewing emails based on the selected newsletter. The post model doesn't get a newsletter attached until a publish occurs so we can't use `post.newsletter` and need to give the option of specifying which newsletter to preview via query params.

- added support for `newsletter` query param on the `GET /email_previews/posts/:id/` endpoint where the value is a newsletter slug
- updated `generateEmailContent()` signature to use an options object because the order of memberSegment/newsletter arguments doesn't matter and is difficult to reason about if not named
- adjusted `generateEmailContent()` to fetch the newsletter matching the provided slug, falling back to the default newsletter if no slug is provided
2022-05-16 12:15:54 +01:00
..
e2e-api Added newsletter param to email preview endpoint (#14820) 2022-05-16 12:15:54 +01:00
e2e-browser Added note about installing the E2E browsers 2022-02-22 10:20:40 +01:00
e2e-frontend 🔥 Removed legacy product + price helpers from themes 2022-05-12 18:58:01 +01:00
e2e-server Added MRR stats service and endpoint (#14427) 2022-04-08 09:18:04 +02:00
integration Added permissions for Authors to read labels 2022-05-12 16:07:05 +01:00
regression Removed backwards compatibility for slack setting 2022-05-16 11:38:59 +01:00
unit Revert "Updated plaintext to be a partial doc" 2022-05-16 10:20:26 +01:00
utils Renamed newsletter_id and email_recipient_filter options (#14798) 2022-05-16 10:18:04 +02:00
.eslintignore Updated casper test fixture to latest version 2022-01-25 14:10:53 +00:00
.eslintrc.js
.jshintrc