changeset 173 | cf7b221238fd |
child 319 | 78990a8a069b |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cms/app-client/mirage/serializers/discourse.js Tue Jun 07 01:16:31 2016 +0200 @@ -0,0 +1,9 @@ +import { JSONAPISerializer } from 'ember-cli-mirage'; + +import _ from 'lodash/lodash'; + +export default JSONAPISerializer.extend({ + serialize(response) { + return _(response.models).map((discourse) => { return [discourse.id, {count: discourse.count, label: discourse.label}];}).object().value(); + } +});