| author | ymh <ymh.work@gmail.com> |
| Tue, 22 Nov 2016 18:50:50 +0100 | |
| changeset 435 | c53b87b00ea3 |
| parent 319 | 78990a8a069b |
| child 474 | 245b4df137d3 |
| permissions | -rw-r--r-- |
import { JSONAPISerializer } from 'ember-cli-mirage'; import _ from 'lodash/lodash'; export default JSONAPISerializer.extend({ serialize(response) { return { 'discourses' : _(response.models).map((discourse) => { return [discourse.id, {count: discourse.count, label: discourse.label}];}).object().value()}; } });