Ghost/core/server/api/v2
Fabien 'egg' O'Carroll 6140a98351
Updated newsletter functionality to use email_recipient_filter (#12343)
no-issue

* Used email_recipient_filter in MEGA

This officially decouples the newsletter recipients from the post
visibility allowing us to send emails to free members only

* Supported enum for send_email_when_published in model

This allows us to migrate from the previously used boolean to an enum
when we eventually rename the email_recipient_filter column to
send_email_when_published

* Updated the posts API to handle email_recipient_filter

We now no longer rely on the send_email_when_published property to send
newsletters, meaning we can remove the column and start cleaning up the
new columns name

* Handled draft status changes when emails not sent

We want to reset any concept of sending an email when a post is
transition to the draft status, if and only if, and email has not
already been sent. If an email has been sent, we should leave the email
related fields as they were.

* Removed send_email_when_published from add method

This is not supported at the model layer

* Removed email_recipient_filter from v2&Content API

This should not be exposed on previous api versions, or publicly

* Removed reference to send_email_when_published

This allows us to move completely to the email_recipient_filter
property, keeping the code clean and allowing us to delete the
send_email_when_published column in the database. We plan to then
migrate _back_ to the send_email_when_published name at both the
database and api level.
2020-11-06 17:32:23 +00:00
..
utils Updated newsletter functionality to use email_recipient_filter (#12343) 2020-11-06 17:32:23 +00:00
actions.js Added v2 actions endpoint 2019-02-06 21:36:09 +01:00
authentication.js Moved config from server to shared (#11850) 2020-05-27 18:47:53 +01:00
authors-public.js Refactored common lib import to use destructuring (#11835) 2020-05-22 19:22:20 +01:00
config.js Moved config from server to shared (#11850) 2020-05-27 18:47:53 +01:00
db.js Refactored common lib import to use destructuring (#11835) 2020-05-22 19:22:20 +01:00
images.js Renamed uploads to images 2019-02-24 11:18:45 +07:00
index.js Merge branch 'master' into v3 2019-10-11 11:31:31 +01:00
integrations.js Refactored common lib import to use destructuring (#11835) 2020-05-22 19:22:20 +01:00
invites.js Fixed "no-shadow" linting error in server modules (#12287) 2020-10-20 12:02:56 +13:00
mail.js Refactored common lib import to use destructuring (#11835) 2020-05-22 19:22:20 +01:00
notifications.js Refactored common lib import to use destructuring (#11835) 2020-05-22 19:22:20 +01:00
oembed.js 🐛 Fixed fallback to bookmark card when pasting localhost Ghost url 2020-06-15 18:38:43 +01:00
pages-public.js Refactored common lib import to use destructuring (#11835) 2020-05-22 19:22:20 +01:00
pages.js Moved core/server/lib/url-utils to core/shared/url-utils (#11856) 2020-05-28 11:57:02 +01:00
posts-public.js Refactored common lib import to use destructuring (#11835) 2020-05-22 19:22:20 +01:00
posts.js Moved core/server/lib/url-utils to core/shared/url-utils (#11856) 2020-05-28 11:57:02 +01:00
preview.js Refactored common lib import to use destructuring (#11835) 2020-05-22 19:22:20 +01:00
redirects.js Extracted frontend code from redirects API controllers (#10798) 2019-06-21 16:50:16 +02:00
roles.js Migrated roles controller to API v2 2018-10-10 16:48:22 +02:00
schedules.js 🐛 Fixed scheduled post emails pointing at /404/ for the "view online" link 2020-10-08 10:26:49 +01:00
session.js Refactored common lib import to use destructuring (#11835) 2020-05-22 19:22:20 +01:00
settings-public.js Moved core/server/lib/url-utils to core/shared/url-utils (#11856) 2020-05-28 11:57:02 +01:00
settings.js Added routes.yaml content checksum storage to the db 2020-09-10 10:54:57 +12:00
site.js Moved core/server/lib/url-utils to core/shared/url-utils (#11856) 2020-05-28 11:57:02 +01:00
slack.js Refactored common lib import to use destructuring (#11835) 2020-05-22 19:22:20 +01:00
slugs.js Refactored common lib import to use destructuring (#11835) 2020-05-22 19:22:20 +01:00
tags-public.js Refactored common lib import to use destructuring (#11835) 2020-05-22 19:22:20 +01:00
tags.js Refactored common lib import to use destructuring (#11835) 2020-05-22 19:22:20 +01:00
themes.js Refactored common lib import to use destructuring (#11835) 2020-05-22 19:22:20 +01:00
users.js Refactored common lib import to use destructuring (#11835) 2020-05-22 19:22:20 +01:00
webhooks.js Added Location header to API's POST request responses (#12186) 2020-09-14 22:33:37 +12:00