Removed outdated post serialization code

refs 0306c397d0
refs https://github.com/TryGhost/Toolbox/issues/522

- 'extraProperties' should have been cleaned up along with the referenced commit. This property does not perform any logic in current codebase (see ref) and makes it problematic to make "post" resource serialization more generic (for caching purposes).
This commit is contained in:
Naz 2023-02-20 18:33:54 +08:00
parent 49ea1682d0
commit d6f1e51dd6
No known key found for this signature in database

View File

@ -23,11 +23,8 @@ const labs = require('../../../../../../../shared/labs');
module.exports = async (model, frame, options = {}) => {
const {tiers: tiersData} = options || {};
const extendedOptions = Object.assign(_.cloneDeep(frame.options), {
extraProperties: ['canonical_url']
});
const jsonModel = model.toJSON(extendedOptions);
const jsonModel = model.toJSON(frame.options);
// Map email_recipient_filter to email_segment
jsonModel.email_segment = jsonModel.email_recipient_filter;