author | ymh <ymh.work@gmail.com> |
Wed, 19 Oct 2016 00:31:18 +0200 | |
changeset 368 | 5f79f31ca9a2 |
parent 319 | 78990a8a069b |
child 474 | 245b4df137d3 |
permissions | -rw-r--r-- |
173 | 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:
274
diff
changeset
|
7 |
return {'languages' : _(response.models).map((lang) => { return [lang.id, lang.count];}).object().value()}; |
173 | 8 |
} |
9 |
}); |