author | Chloe Laisne <chloe.laisne@gmail.com> |
Fri, 24 Jun 2016 02:07:09 +0200 | |
changeset 204 | dd969e178944 |
parent 173 | cf7b221238fd |
child 236 | ac6928e86d14 |
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((theme) => { return [theme.id, {count: theme.count, label: theme.label}];}).object().value(); |
|
8 |
} |
|
9 |
}); |