Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactored member controller to use model layer
refs TryGhost/Members#105 - As members module has become a core part it makes sense to follow the same principles as in all other controllers and use the model directly instead of calling external services. - Bumped @tryghost/members-api to 0.11.1 . New stripe-specific methods used in controllers are available starting with this version - Exposing these new methods is a little hacky because there are no relationships setup on members_* tables. Left notes for future improvements once relations are introduced. - We don't allow for chaging member's emails at the moment. For this reason had to modify JSON schema a little. It doesn't support OO inheritence: "This shortcoming is perhaps one of the biggest surprises of the combining operations in JSON schema: it does not behave like inheritance in an object-oriented language. " (ref. https://json-schema.org/understanding-json-schema/reference/combining.html#allof)
- Loading branch information