equal
deleted
inserted
replaced
2 |
2 |
3 export default DS.JSONSerializer.extend({ |
3 export default DS.JSONSerializer.extend({ |
4 |
4 |
5 normalizeResponse: function(store, primaryModelClass, payload) { |
5 normalizeResponse: function(store, primaryModelClass, payload) { |
6 var data = []; |
6 var data = []; |
7 Object.keys(payload).forEach(function(key) { |
7 var themes = payload['themes']; |
|
8 Object.keys(themes).forEach(function(key) { |
8 data.push({ |
9 data.push({ |
9 'id': key, |
10 'id': key, |
10 'type': 'theme', |
11 'type': 'theme', |
11 'attributes': { |
12 'attributes': { |
12 'label': payload[key].label, |
13 'label': themes[key].label, |
13 'count': payload[key].count |
14 'count': themes[key].count |
14 } |
15 } |
15 }); |
16 }); |
16 }); |
17 }); |
17 return { |
18 return { |
18 'data': data |
19 'data': data |