author | ymh <ymh.work@gmail.com> |
Tue, 07 Jun 2016 01:16:31 +0200 | |
changeset 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 |
}); |