cms/app-client/mirage/serializers/language.js
author ymh <ymh.work@gmail.com>
Sat, 06 Aug 2016 21:27:53 +0700
changeset 260 64caee7ce38d
parent 173 cf7b221238fd
child 274 53a6985443f8
permissions -rw-r--r--
Split document model in document and document results

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

import _ from 'lodash/lodash';


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