mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-20 17:32:15 +03:00
afbe0c27fb
closes https://github.com/TryGhost/Team/issues/552 Refactors URL transforms so they take place at the model layer rather than the API serializer layer. Continuation of the pattern created for the settings model in https://github.com/TryGhost/Ghost/pull/12738 - Added checks to all front-end tests to ensure output does not contain the magic replacement string - includes failing acceptance test for `__GHOST_URL__` appearing in sitemaps - Removed all transform-ready URL transforms from API serializers - input serializers transform image urls relative->absolute to keep absolute-urls as the consistent "outside of the database" format - output serializers should not need to perform any URL transforms as that will be done at the model layer - Added url transforms to models layer - removes knowledge from the API serializers which shouldn't need to know how data is stored internally in the database - makes absolute urls the consistent "outside of the database" URL format - adds transform step to the sitemap generator because the data used for that is fetched directly via knex which will not run through the bookshelf `parse()` methods |
||
---|---|---|
.. | ||
base | ||
plugins | ||
relations | ||
action.js | ||
api-key.js | ||
author.js | ||
email-batch.js | ||
email-recipient.js | ||
email.js | ||
index.js | ||
integration.js | ||
invite.js | ||
label.js | ||
member-email-change-event.js | ||
member-login-event.js | ||
member-paid-subscription-event.js | ||
member-payment-event.js | ||
member-status-event.js | ||
member-stripe-customer.js | ||
member-subscribe-event.js | ||
member.js | ||
mobiledoc-revision.js | ||
permission.js | ||
post.js | ||
posts-meta.js | ||
role.js | ||
session.js | ||
settings.js | ||
single-use-token.js | ||
snippet.js | ||
stripe-customer-subscription.js | ||
tag-public.js | ||
tag.js | ||
user.js | ||
webhook.js |