mirror of
https://github.com/documize/community.git
synced 2025-08-02 03:55:24 +02:00
Create attachment model and push attachment data into store
This commit is contained in:
parent
d47f1e11b8
commit
b638d6a114
5 changed files with 67 additions and 49 deletions
|
@ -256,9 +256,9 @@ export default Ember.Service.extend({
|
|||
method: 'GET'
|
||||
}).then((response) => {
|
||||
let data = [];
|
||||
_.each(response, function (obj) {
|
||||
let data = this.get('store').normalize('attachment', obj);
|
||||
let attachments = this.get('store').push({ data: data });
|
||||
_.each(response, (obj) => {
|
||||
let attachmentData = this.get('store').normalize('attachment', obj);
|
||||
let attachments = this.get('store').push({ data: attachmentData });
|
||||
data.pushObject(attachments);
|
||||
});
|
||||
return data;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue