cms/app-client/app/serializers/geostat.js
changeset 284 12448de16a63
child 319 78990a8a069b
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cms/app-client/app/serializers/geostat.js	Fri Sep 23 15:43:52 2016 +0200
@@ -0,0 +1,21 @@
+import DS from 'ember-data';
+
+export default DS.Serializer.extend({
+
+    normalizeResponse: function(store, primaryModelClass, payload) {
+        var data = [];
+        Object.keys(payload).forEach(function(key) {
+            data.push({
+                'id': key,
+                'type': 'geostat',
+                'attributes': {
+                    'count': payload[key]
+                }
+            });
+        });
+        return {
+            'data': data
+        };
+    }
+
+});
\ No newline at end of file