cms/app-client/mirage/serializers/datestat.js
changeset 319 78990a8a069b
parent 307 07b44a378ad8
child 532 1190ea937f2d
equal deleted inserted replaced
318:5564f5065f81 319:78990a8a069b
     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 });