0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-17 23:44:39 -05:00
ghost/core/server/api/canary
Rishabh eac732f620 Added tiers data for posts with non tiers visibility
refs https://github.com/TryGhost/Team/issues/1004

The `tiers` column for a post/page only contained data if its visibility is set to `tiers`, otherwise its empty. This is because originally the purpose of `tiers` column on `post` was to capture specific tiers with access to post.
The best way to ensure a consistent behavior for `tiers` column data on post is to update it to always contain list of all `tiers` that have access to post, and not just when the visibility is `tiers`. This means the value is set to all tiers when visibility is one of public|members, and only paid tiers when visibility is `paid`.  This change also allows on frontend to get all relevant `tiers` information for a post locally within post context instead of relying on additional information from outside.

This change -

- updates the output serializer for post/page to add all desired tiers manually in case of visibility is not `tiers`
- updates tests
2022-03-04 18:22:59 +05:30
..
utils Added tiers data for posts with non tiers visibility 2022-03-04 18:22:59 +05:30
actions.js
authentication.js Added accentColor and description parameters to /authentication/setup route 2022-02-24 12:36:57 -04: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-preview.js
email.js
files.js Added Files API behind an alpha flag 2021-11-08 11:40:17 +04:00
identities.js
images.js Made storage calls related to images use "images" feature 2021-10-21 20:22:45 +13:00
index.js Added /tiers endpoint to Content API 2022-03-03 15:15:43 +02:00
integrations.js
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
members.js Added include as a valid option for members browse api 2022-02-28 15:30:15 +05:30
memberSigninUrls.js Replaced i18n.t w/ tpl helper in memberSigninUrls.js (#13462) 2021-10-06 11:41:37 +01:00
membersStripeConnect.js Fixed max-complexity-warnings for stripe_connect API 2021-10-25 14:06:28 +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.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 Updated serialization for handling tiers visibility 2022-02-01 11:13:51 +05:30
posts-public.js Updated serialization for handling tiers visibility 2022-02-01 11:13:51 +05:30
posts.js Updated serialization for handling tiers visibility 2022-02-01 11:13:51 +05:30
preview.js Replaced i18n.t w/ tpl helper in preview.js (#13494) 2021-10-08 15:32:51 +01:00
products-public.js Included benefits with theme product data (#14051) 2022-01-24 13:55:25 +02:00
products.js Cleaned up Products API add & edit 2022-01-25 15:45:20 +02:00
redirects.js Used DynamicRedirectManager for Custom Redirects 2021-11-03 07:41:55 +13:00
roles.js
schedules.js
session.js Switch to @tryghost/errors from ignition errors package (#13807) 2021-12-01 10:22:01 +00:00
settings-public.js
settings.js 🐛 Fixed Offer Redemptions being over counted (#13988) 2022-01-18 17:56:47 +02: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
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 Added /tiers API to Admin API (#14200) 2022-02-23 17:00:18 +02: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