| author | ymh <ymh.work@gmail.com> |
| Sat, 06 Aug 2016 21:29:33 +0700 | |
| changeset 261 | 02e2396bcbbc |
| 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 |
}); |