diff --git a/app/app/models/document.js b/app/app/models/document.js index ab787864..b32b2545 100644 --- a/app/app/models/document.js +++ b/app/app/models/document.js @@ -24,7 +24,7 @@ export default Model.extend({ folderId: attr('string'), userId: attr('string'), tags: attr('string'), - template: attr('string'), + template: attr('boolean'), // client-side property selected: attr('boolean', { defaultValue: false }), diff --git a/app/app/services/document.js b/app/app/services/document.js index 176db9ff..b5b52c15 100644 --- a/app/app/services/document.js +++ b/app/app/services/document.js @@ -73,12 +73,10 @@ export default Ember.Service.extend({ // saveDocument updates an existing document record. save(doc) { let id = doc.get('id'); - let data = doc.toJSON(); - Ember.set(data, 'id', id) return this.get('ajax').request(`documents/${id}`, { method: 'PUT', - data: JSON.stringify(data) + data: JSON.stringify(doc) }); },