Ghost/core/server
Fabien 'egg' O'Carroll c19d282a51
Ensured Admin API members resource only returns known fields (#12240)
refs #12055

As part of the work in TryGhost/Members#206 we load the stripeCustomers relation on the member model, and we do not want this to be part of the API response. The changes here include a refactor but the main thing is that the serialized object is explicit and does not include unexpected or unknown fields.

* Moved mapMember out of mapper file

This cleans up the serializer a bit by keeping it's functionality all in
one place, rather than a shared mapper file

* Refactored members controller to return models

Previously the controller was calling toJSON, which is serialization,
this updates the controller to only deal with models, leaving all of the
serialization to the serializer!

* Refactored members serializer

This adds typings to all of the methods/functions in the serializer, as
well as making the serializating explicit, rather than returning the
result of toJSON, we explicitly set the properties we expect to be on
the output object. This protects us against accidental API changes in
the future.
2020-09-30 10:22:22 +01:00
..
adapters Replaced constants file with @tryghost/constants 2020-08-11 12:51:16 +01:00
api Ensured Admin API members resource only returns known fields (#12240) 2020-09-30 10:22:22 +01:00
data Added migration to store from/reply-to values in email table (#12204) 2020-09-24 08:20:10 +01:00
lib Extracted promise libs and history into @tryghost/promise 2020-08-11 18:44:21 +01:00
models Store email batch and recipient records when sending newsletters (#12195) 2020-09-29 17:17:54 +01:00
public Added support for data-members-name in themes (#12191) 2020-09-23 13:59:26 +01:00
services Refactor mega service to use stored email content and batch/recipient records 2020-09-29 17:17:54 +01:00
translations Updated Webhook API error message 2020-09-28 13:24:47 +02:00
views Updated head to only output custom favicons (#11949) 2020-06-30 15:07:08 +01:00
web Added handling for new members support/reply email addresses 2020-08-31 18:09:38 +05:30
analytics-events.js Moved config from server to shared (#11850) 2020-05-27 18:47:53 +01:00
ghost-server.js Improved testmode logging of shutdown status 2020-08-18 15:48:42 +01:00
index.js Added routes.yaml content checksum storage to the db 2020-09-10 10:54:57 +12:00
overrides.js Disabled bluebird debug logs 2018-08-13 14:01:31 +02:00
update-check.js Moved core/server/lib/common/logging to core/shared/logging (#11857) 2020-05-28 19:30:23 +01:00