mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-19 08:31:43 +03:00
fcb27507d3
refs https://github.com/TryGhost/Team/issues/1423 - problem: - all members requests were automatically adding `?include=email_recipients` as the email recipients relationship was set up to be always embedded - embedded email_recipient records also embed the whole email record - on the members index screen this meant for each of the 50 members loaded on a page we were also loading every email they have ever received resulting in a huge API response - this was not a problem previously because the API was ignoring the `include` parameter on the browse endpoint and Admin wasn't formatting the include properly in snake_case - solution: - the only place we need associated email recipients is on the member details screen where they are used to show the email activity feed - removing the `{embedded: 'always'}` option for the `member.emailRecipients` association stops `?include=email_recipients` being added automatically to every members request - the member details screen explicitly adds `?include=email_recipients` so no further changes are needed - activity feed will be changing to use proper event objects in the future and further optimisation can be made |
||
---|---|---|
.. | ||
members | ||
settings | ||
authentication-test.js | ||
content-test.js | ||
custom-post-templates-test.js | ||
dashboard-test.js | ||
editor-test.js | ||
error-handling-test.js | ||
launch-flow-test.js | ||
members-activity-test.js | ||
members-test.js | ||
offers-test.js | ||
password-reset-test.js | ||
setup-test.js | ||
signin-test.js | ||
signup-test.js | ||
staff-test.js |