cms/app-client/mirage/serializers/language.js
author ymh <ymh.work@gmail.com>
Wed, 28 Sep 2016 17:24:02 +0200
changeset 306 3fccf43160a7
parent 274 53a6985443f8
child 319 78990a8a069b
permissions -rw-r--r--
Some more changes linked to the change of api organization + some jshint error cleaning

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