cms/app-client/mirage/serializers/datestat.js
changeset 339 766af1228b05
parent 319 78990a8a069b
child 532 1190ea937f2d
equal deleted inserted replaced
338:4a3899b6a7ed 339:766af1228b05
     2 
     2 
     3 import _ from 'lodash/lodash';
     3 import _ from 'lodash/lodash';
     4 
     4 
     5 export default JSONAPISerializer.extend({
     5 export default JSONAPISerializer.extend({
     6     serialize(response) {
     6     serialize(response) {
     7         return _(response.models).map((dateinfo) => { return [dateinfo.id, dateinfo.count];}).object().value();
     7         return {'datestats': _(response.models).map((dateinfo) => { return [dateinfo.id, dateinfo.count];}).object().value()};
     8     }
     8     }
     9 });
     9 });