author | ymh <ymh.work@gmail.com> |
Tue, 04 Oct 2016 11:58:39 +0200 | |
changeset 319 | 78990a8a069b |
parent 173 | cf7b221238fd |
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:
173
diff
changeset
|
7 |
return { 'discourses' : _(response.models).map((discourse) => { return [discourse.id, {count: discourse.count, label: discourse.label}];}).object().value()}; |
173 | 8 |
} |
9 |
}); |