0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-13 22:41:32 -05:00

Merge pull request #4653 from jaswilli/client-data

Do not include url and author_id in post payload.
This commit is contained in:
Hannah Wolfe 2014-12-15 15:58:08 +00:00
commit 7d0deebc08

View file

@ -52,10 +52,14 @@ var PostSerializer = ApplicationSerializer.extend(DS.EmbeddedRecordsMixin, {
var root = Ember.String.pluralize(type.typeKey),
data = this.serialize(record, options);
// Don't ever pass uuid's
// Properties that exist on the model but we don't want sent in the payload
delete data.uuid;
// Don't send HTML
delete data.html;
// Inserted locally as a convenience.
delete data.author_id;
// Read-only virtual property.
delete data.url;
hash[root] = [data];
}