0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00

🐛 Fixed potential "Request entity too large" error when saving members

no issue

- `email_recipient` records are embedded alongside member data when fetching individual members so the member activity feed can be generated
- full email details are included for each email so that previews can be generated which can result in a large payload
- by default Ember Data will push all embedded records back to the server when saving which resulted in `Request entity too large` errors in some environments when a member has received many emails
This commit is contained in:
Kevin Ansfield 2020-12-16 13:41:45 +00:00
parent 27cc99c907
commit eca8392296

View file

@ -15,9 +15,12 @@ export default ApplicationSerializer.extend(EmbeddedRecordsMixin, {
// Properties that exist on the model but we don't want sent in the payload
delete json.stripe;
delete json.geolocation;
delete json.email_recipients;
// Normalize properties
json.name = json.name || '';
json.note = json.note || '';
return json;
}
});