mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-27 21:03:29 +03:00
e97532c475
refs https://github.com/TryGhost/Team/issues/998 - posts have a new `email_only` property for an alpha feature but that is not a valid property for pages - our pages model and serializers currently inherit from the post model/serializer so when saving the new property is triggering a "no additional properties" validation error - updating the pages serializer to remove the new property means the pages add/edit API requests are valid again
18 lines
494 B
JavaScript
18 lines
494 B
JavaScript
import PostSerializer from './post';
|
|
|
|
export default PostSerializer.extend({
|
|
serialize(/*snapshot, options*/) {
|
|
let json = this._super(...arguments);
|
|
|
|
// Properties that exist on the model but we don't want sent in the payload
|
|
delete json.email_subject;
|
|
delete json.send_email_when_published;
|
|
delete json.email_recipient_filter;
|
|
delete json.email_only;
|
|
delete json.email_id;
|
|
delete json.email;
|
|
|
|
return json;
|
|
}
|
|
});
|