1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-24 15:49:44 +02:00

Fix model for adding a new tag to a document

This commit is contained in:
zinyando 2016-08-29 16:06:13 +02:00
parent 98951bc5ef
commit a33232dea4
2 changed files with 2 additions and 4 deletions

View file

@ -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 }),

View file

@ -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)
});
},