mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-02 07:43:11 +03:00
322664a145
refs https://github.com/TryGhost/Team/issues/581 refs https://github.com/TryGhost/Team/issues/582 When publishing a post via the API it was possible to send it using `?email_recipient_filter=all/free/paid` which allowed you to send to members only based on their payment status which is quite limiting for some sites. This PR updates the `?email_recipient_filter` query param to support Ghost's `?filter` param syntax which enables more specific recipient lists, eg: `?email_recipient_filter=status:free` = free members only `?email_recipient_filter=status:paid` = paid members only `?email_recipient_filter=label:vip` = members that have the `vip` label attached `?email_recipient_filter=status:paid,label:vip` = paid members and members that have the `vip` label attached The older `free/paid` values are still supported by the API for backwards compatibility. - updates `Post` and `Email` models to transform legacy `free` and `paid` values to their NQL equivalents on read/write - lets us not worry about supporting legacy values elsewhere in the code - cleanup migration to transform all rows slated for 5.0 - removes schema and API `isIn` validations for recipient filters so allow free-form filters - updates posts API input serializers to transform `free` and `paid` values in the `?email_recipient_filter` param to their NQL equivalents for backwards compatibility - updates Post API controllers `edit` methods to run a query using the supplied filter to verify that it's valid - updates `mega` service to use the filter directly when selecting recipients |
||
---|---|---|
.. | ||
utils | ||
actions.js | ||
authentication.js | ||
authors-public.js | ||
config.js | ||
db.js | ||
email-preview.js | ||
email.js | ||
identities.js | ||
images.js | ||
index.js | ||
integrations.js | ||
invites.js | ||
labels.js | ||
mail.js | ||
members.js | ||
memberSigninUrls.js | ||
membersStripeConnect.js | ||
notifications.js | ||
oembed.js | ||
pages-public.js | ||
pages.js | ||
posts-public.js | ||
posts.js | ||
preview.js | ||
redirects.js | ||
roles.js | ||
schedules.js | ||
session.js | ||
settings-public.js | ||
settings.js | ||
site.js | ||
slack.js | ||
slugs.js | ||
snippets.js | ||
tags-public.js | ||
tags.js | ||
themes.js | ||
users.js | ||
webhooks.js |