0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00
ghost/core/server
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
..
adapters 🔥 Removed versioned APIs 2022-04-28 15:37:09 +01:00
api Added newsletter param to email preview endpoint (#14820) 2022-05-16 12:15:54 +01:00
data Removed unused code for logging in MySQL lib 2022-05-16 10:53:08 +01:00
lib Added gravatar URL to config to make it configurable (#14490) 2022-05-09 12:44:04 +01:00
models Refactored html-to-plaintext to have two functions 2022-05-16 09:38:16 +01:00
services Added newsletter param to email preview endpoint (#14820) 2022-05-16 12:15:54 +01:00
views
web Removed GET settings/:key route 2022-05-13 23:18:53 +01:00
analytics-events.js
ghost-server.js Removed config and bluebird from ghost-server 2022-04-28 15:37:10 +01:00
notify.js
overrides.js
run-update-check.js Renamed settings index.js to settings-service.js 2022-05-10 20:55:31 +01:00
update-check.js 🔥 Removed versioned APIs 2022-04-28 15:37:09 +01:00