- First implementation of filter for languages.
- Language is now an array in the document
- various corrections linked to the above change
- Simplify the IndexDocumet loop
import DS from 'ember-data';
export default DS.JSONSerializer.extend({
normalizeResponse: function(store, primaryModelClass, payload) {
var data = [];
var themes = payload['themes'];
Object.keys(themes).forEach(function(key) {
data.push({
'id': key,
'type': 'theme',
'attributes': {
'label': themes[key].label,
'count': themes[key].count
}
});
});
return {
'data': data
};
}
});