0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-27 22:49:56 -05:00
ghost/core/server/services
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
..
adapter-manager
api-version-compatibility Renamed settings index.js to settings-service.js 2022-05-10 20:55:31 +01:00
auth Swapped setup to use tiers API endpoint 2022-05-12 19:48:27 +01:00
bulk-email Disabled model auto-refresh when processing email batches 2022-05-10 18:11:15 +01:00
email-analytics Prevent an event-processing error if there is no timezone setting 2022-03-02 13:58:26 +01:00
frontend-data-service Added frontend key to ghost_head for portal (#14782) 2022-05-11 17:34:31 +01:00
integrations
invitations
invites
jobs
mail Extracted email-content-generator into a package 2022-05-04 17:28:09 +08:00
mega Added newsletter param to email preview endpoint (#14820) 2022-05-16 12:15:54 +01:00
members Removed unused frontend offer endpoint (#14816) 2022-05-13 17:20:09 +05:30
newsletters Fixed error in newsletter editing limit checks (#14817) 2022-05-13 10:15:35 +02:00
notifications
offers Fixed same redirectManager used in offer service between tests (#14340) 2022-03-24 10:18:52 +01:00
permissions
posts Renamed newsletter_id and email_recipient_filter options (#14798) 2022-05-16 10:18:04 +02:00
public-config 🐛 Fixed config API not returning boolean 2022-01-20 18:25:41 +02:00
redirects
route-settings Removed sync method from route settings loader 2022-04-28 15:37:09 +01:00
settings Extended public settings to include portal settings (#14801) 2022-05-12 19:54:45 +05:30
stats Replaced stats service with @tryghost/stats-service (#14527) 2022-04-21 14:57:07 +01:00
stripe Cleaned up output errors during tests 2022-04-05 18:17:47 +08:00
themes Switched gscan to validate against v5 set of rules 2022-05-02 20:56:25 +08:00
url 🔥 Removed support for http/https mixed mode (#14783) 2022-05-11 14:53:23 +01:00
webhooks Added 'Content-Version' header to outgoing webhook requests 2022-05-12 13:54:21 +08:00
custom-theme-settings.js
limits.js Fixed incorrect usage of limit config causing Ghost not to boot 2022-05-10 15:47:45 -04:00
nft-oembed.js
oembed.js Added missing message string 2022-03-21 09:07:54 +00:00
slack.js Replaced schema.isPost in slack service /w custom fn 2022-04-05 14:24:42 +01:00
twitter-embed.js Removed richTwitterNewsletters GA labs flag 2022-01-04 13:07:39 +00:00
users.js Renamed destroyByAuthor to reassignByAuthor 2022-04-28 15:37:13 +01:00
xmlrpc.js