author | ymh <ymh.work@gmail.com> |
Sat, 03 Dec 2016 02:43:57 +0100 | |
changeset 463 | 5c43f17f87b5 |
parent 319 | 78990a8a069b |
child 532 | 1190ea937f2d |
permissions | -rw-r--r-- |
307 | 1 |
import { JSONAPISerializer } from 'ember-cli-mirage'; |
2 |
||
3 |
import _ from 'lodash/lodash'; |
|
4 |
||
5 |
export default JSONAPISerializer.extend({ |
|
6 |
serialize(response) { |
|
319
78990a8a069b
Work on front and back integration, correct the expected data format
ymh <ymh.work@gmail.com>
parents:
307
diff
changeset
|
7 |
return {'datestats': _(response.models).map((dateinfo) => { return [dateinfo.id, dateinfo.count];}).object().value()}; |
307 | 8 |
} |
9 |
}); |