| author | Chloe Laisne <chloe.laisne@gmail.com> |
| Mon, 26 Sep 2016 20:17:26 +0200 | |
| changeset 297 | 50c80dda4fb8 |
| parent 173 | cf7b221238fd |
| child 319 | 78990a8a069b |
| 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) { |
|
7 |
return _(response.models).map((discourse) => { return [discourse.id, {count: discourse.count, label: discourse.label}];}).object().value(); |
|
8 |
} |
|
9 |
}); |