cms/app-client/mirage/serializers/discourse.js
author Chloe Laisne <chloe.laisne@gmail.com>
Sat, 15 Oct 2016 16:15:07 +0530
changeset 336 f076ddd29e13
parent 173 cf7b221238fd
child 319 78990a8a069b
permissions -rw-r--r--
Playlist scroll to show playing track in view always

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();
    }
});