cms/app-client/mirage/serializers/theme.js
author ymh <ymh.work@gmail.com>
Wed, 06 Jul 2016 14:24:21 +0200
changeset 230 6e4cabc614ef
parent 173 cf7b221238fd
child 236 ac6928e86d14
permissions -rw-r--r--
forgotten hgignore file

import { JSONAPISerializer } from 'ember-cli-mirage';

import _ from 'lodash/lodash';

export default JSONAPISerializer.extend({
    serialize(response) {
        return _(response.models).map((theme) => { return [theme.id, {count: theme.count, label: theme.label}];}).object().value();
    }
});