1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-30 18:49:43 +02:00

Saving work on tag fix

This commit is contained in:
zinyando 2016-08-29 12:23:07 +02:00
parent 3704981964
commit 98951bc5ef
3 changed files with 11 additions and 6 deletions

View file

@ -73,10 +73,12 @@ 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(doc)
data: JSON.stringify(data)
});
},