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:
parent
98951bc5ef
commit
a33232dea4
2 changed files with 2 additions and 4 deletions
|
@ -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 }),
|
||||
|
|
|
@ -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)
|
||||
});
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue