| author | Chloe Laisne <chloe.laisne@gmail.com> |
| Mon, 26 Sep 2016 20:17:26 +0200 | |
| changeset 297 | 50c80dda4fb8 |
| parent 284 | 12448de16a63 |
| child 319 | 78990a8a069b |
| permissions | -rw-r--r-- |
import { JSONAPISerializer } from 'ember-cli-mirage'; import _ from 'lodash/lodash'; export default JSONAPISerializer.extend({ serialize(response, request) { var map = response.models.find(map => map.id === request.queryParams['area']); return _(map && map.areas || {}).map((geostat) => { return [geostat.id, geostat.count];}).object().value(); } });