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 021cfecb59
Fixed __GHOST_URL__ appearing in settings values after edit (#12738)
refs https://github.com/TryGhost/Ghost/pull/12736
refs https://github.com/TryGhost/Team/issues/467

knex's `parse()` method is only called on data when directly fetched from the db. This was causing problems when model instances are passed around via events for example because `.get('key')` will return data that was directly set on the model without having gone through the `parse()` transformations. The result of this inconsistency was settings appearing correct when Ghost started up but then being broken as soon as a setting was changed.

- moved absolute/relative->transform-ready URL transformations from the API input serializers to the model's `format()` method and replaced with a relative->absolute transform in API input serializers
    - results in consistency because `.get()` on a settings model will always return an URL
- removed transform-ready->absolute transforms from the API output serializers as that is now handled at the model-layer
2021-03-08 18:41:43 +00:00
..
utils Fixed __GHOST_URL__ appearing in settings values after edit (#12738) 2021-03-08 18:41:43 +00:00
actions.js
authentication.js
authors-public.js
config.js Changed Config API response structure 2021-03-04 21:16:20 +00:00
db.js
email-preview.js Bumped MEGA related serialization code to use v4 API 2021-03-02 14:31:01 +13:00
email.js Added new browse email endpoint 2021-02-22 13:55:20 +05:30
identities.js
images.js Removed global.Promise override (#12182) 2020-11-04 10:55:47 +00:00
index.js Added basic CRUD admin API for snippets 2020-10-16 18:02:58 +01:00
integrations.js
invites.js Refactored invites module into a class 2021-01-14 19:42:38 +13:00
labels.js
mail.js
members.js Cleaned member stats endpoints response 2021-03-05 16:39:12 +05:30
memberSigninUrls.js Updated getMagicLink call to handle Promise return 2020-09-18 10:49:18 +01:00
membersStripeConnect.js
notifications.js Fixed update check tests 2021-01-14 18:30:09 +13:00
oembed.js Moved the OEmbed service to use our DI pattern 2021-01-15 15:35:30 +01:00
pages-public.js
pages.js
posts-public.js
posts.js Added new member limit & removed old 2021-03-04 18:16:34 +00:00
preview.js
redirects.js Added .yaml format support in redirects configuration (#12187) 2020-11-04 12:08:32 +13:00
roles.js
schedules.js 🐛 Fixed scheduled post emails pointing at /404/ for the "view online" link 2020-10-08 10:26:49 +01:00
session.js
settings-public.js
settings.js Refactored usage of the pre v4 "slack" setting 2021-02-15 15:25:54 +13:00
site.js Added 'icon' to site API endpoint 2021-03-03 13:49:44 +01:00
slack.js
slugs.js
snippets.js Added basic CRUD admin API for snippets 2020-10-16 18:02:58 +01:00
tags-public.js
tags.js
themes.js Updated host config to correctly use camelCase 2021-03-04 11:39:32 +00:00
users.js Moved the users service to use our DI pattern 2021-01-15 17:58:36 +01:00
webhooks.js Added check for parent integration_id when creating a webhook 2020-09-24 15:09:51 +12:00