1
0
Fork 0
mirror of https://github.com/TryGhost/Ghost-Admin.git synced 2023-12-14 02:33:04 +01:00
Ghost-Admin/app/serializers/application.js

19 lines
534 B
JavaScript
Raw Normal View History

var ApplicationSerializer = DS.RESTSerializer.extend({
serializeIntoHash: function (hash, type, record, options) {
// Our API expects an id on the posted object
options = options || {};
options.includeId = true;
// We have a plural root in the API
var root = Ember.String.pluralize(type.typeKey),
data = this.serialize(record, options);
// Don't ever pass uuid's
delete data.uuid;
hash[root] = [data];
}
});
export default ApplicationSerializer;