0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00
ghost/core/server
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
..
adapters Improved JSDoc in default scheduler 2020-12-16 17:25:05 +13:00
api Fixed __GHOST_URL__ appearing in settings values after edit (#12738) 2021-03-08 18:41:43 +00:00
data 🏗 Changed internal URL storage format to use __GHOST_URL__ (#12731) 2021-03-05 13:54:01 +00:00
lib Added mobiledoc.ghostVersion to blank mobiledoc document 2021-02-15 18:10:56 +00:00
models Fixed __GHOST_URL__ appearing in settings values after edit (#12738) 2021-03-08 18:41:43 +00:00
public Enabled Portal (#12317) 2020-11-03 14:36:21 +05:30
services Added new member limit & removed old 2021-03-04 18:16:34 +00:00
translations Added ability to install themes directly from GitHub (#12635) 2021-02-12 09:19:17 +00:00
views Added new, simpler, linear boot process 2021-02-08 11:56:44 +00:00
web Added missing v4 API endpoints mount 2021-03-03 18:44:00 +13:00
analytics-events.js Wrapped analytics tracker in try-catch 2021-02-24 15:57:38 +00:00
ghost-server.js Cleaned up use of express in ghost-server 2021-02-23 12:33:00 +00:00
notify.js Refactored notify to send started + ready 2021-02-19 20:42:10 +00:00
overrides.js Moved sqlite3 override rules to db connection lib 2021-02-05 11:51:56 +00:00
update-check.js Moved core/server/lib/common/logging to core/shared/logging (#11857) 2020-05-28 19:30:23 +01:00