mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-29 15:12:58 +03:00
Turn your audience into a business. Publishing, memberships, subscriptions and newsletters.
bloggingcmsemberghosthacktoberfestheadless-cmsjamstackjavascriptjournalismnodejspublishingweb-application
129d202595
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 |
||
---|---|---|
ghost/admin |