0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00
ghost/core/server/api/canary
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
..
utils Removed backwards compatibility for slack setting 2022-05-16 11:38:59 +01:00
actions.js
authentication.js Changed /authentication/reset_all_passwords to return 204 response code 2022-04-28 15:37:11 +01:00
authors-public.js
config.js
custom-theme-settings.js Added API tests for custom theme settings (#13519) 2021-10-08 16:18:49 +01:00
db.js Switch to @tryghost/errors from ignition errors package (#13807) 2021-12-01 10:22:01 +00:00
email-post.js Updated serialization for handling tiers visibility 2022-02-01 11:13:51 +05:30
email-previews.js Added newsletter param to email preview endpoint (#14820) 2022-05-16 12:15:54 +01:00
emails.js Added missing e2e emails API browse & retry tests 2022-03-28 17:32:58 +01:00
files.js Added Files API behind an alpha flag 2021-11-08 11:40:17 +04:00
identities.js Removed extraneous permission flag in identities 2022-03-15 14:58:29 +00:00
images.js Made storage calls related to images use "images" feature 2021-10-21 20:22:45 +13:00
index.js Replaced Products with Tiers API endpoints 2022-05-12 19:59:57 +01:00
integrations.js Replaced i18n.t w/ tpl helper in email and integrations (#13424) 2021-10-04 10:02:27 +01:00
invites.js Replaced i18n.t w/ tpl helper in invites.js (#13433) 2021-10-06 09:49:20 +01:00
labels.js Replaced i18n.t w/ tpl helper in invites.js (#13433) 2021-10-06 09:49:20 +01:00
mail.js Replaced i18n.t w/ tpl helper in mail.js 2021-10-05 09:43:47 +01:00
media.js Reworked media API thumbnail endpoint 2021-11-29 13:12:47 +04:00
member-signin-urls.js Fixed filename casing in canary API 2022-03-24 17:25:53 +00:00
members-stripe-connect.js Fixed filename casing in canary API 2022-03-24 17:25:53 +00:00
members.js Allowed tiers include and data for member endpoints (#14790) 2022-05-11 22:26:03 +05:30
newsletters-public.js Added newsletters endpoint to Content API (#14778) 2022-05-11 21:36:43 +05:30
newsletters.js Fixed newsletter includes when adding or editing (#14696) 2022-05-05 11:20:15 +02:00
notifications.js
oembed.js Revert "Revert "Extract logging from DI patterns, only use @tryghost/logging package"" (#13884) 2021-12-14 11:22:39 +00:00
offers-public.js Added offer read endpoint to content API (#14794) 2022-05-12 18:16:10 +05:30
offers.js Added 404 handling for edit Offer 2021-10-22 16:16:39 +02:00
pages-public.js Updated serialization for handling tiers visibility 2022-02-01 11:13:51 +05:30
pages.js Removed API versioning from email serialization 2022-04-28 15:37:06 +01:00
posts-public.js Updated serialization for handling tiers visibility 2022-02-01 11:13:51 +05:30
posts.js Renamed newsletter_id and email_recipient_filter options (#14798) 2022-05-16 10:18:04 +02:00
previews.js Renamed preview files to previews 2022-04-28 15:37:14 +01:00
redirects.js Used DynamicRedirectManager for Custom Redirects 2021-11-03 07:41:55 +13:00
roles.js
schedules.js Removed API versioning from post scheduling service 2022-04-28 15:37:09 +01:00
session.js Renamed passwordreset body object to password_reset 2022-04-28 15:37:11 +01:00
settings-public.js Extended public settings to include portal settings (#14801) 2022-05-12 19:54:45 +05:30
settings.js Removed support for editing members_from_address 2022-05-12 20:05:10 +01:00
site.js
slack.js
slugs.js Switch to @tryghost/errors from ignition errors package (#13807) 2021-12-01 10:22:01 +00:00
snippets.js
stats.js Added /stats/subscriptions API (#14547) 2022-04-27 14:53:32 +01:00
tags-public.js Replaced i18n.t w/ tpl helper in core/server/api/canary/* (#13521) 2021-10-11 14:35:43 +01:00
tags.js Replaced i18n.t w/ tpl in tags.js (#13428) 2021-10-05 10:00:00 +01:00
themes.js
tiers-public.js Added /tiers endpoint to Content API 2022-03-03 15:15:43 +02:00
tiers.js Support tier visibility editing Allowed Tiers Admin API to set visibility 2022-03-07 14:46:42 +00:00
users.js Replaced i18n.t w/ tpl helper in core/server/api/canary/* (#13521) 2021-10-11 14:35:43 +01:00
webhooks.js Replaced i18n with tpl in webhooks.js 2021-10-07 09:16:20 +01:00