import { JSONAPISerializer } from 'ember-cli-mirage';

import _ from 'lodash';

export default JSONAPISerializer.extend({
    serialize(response) {
        return {'datestats': _(response.models).map((dateinfo) => { return [dateinfo.id, dateinfo.count];}).fromPairs().value()};
    }
});
