github.com/outbrain/consul@v1.4.5/ui-v2/app/serializers/application.js (about)

     1  import Serializer from 'ember-data/serializers/rest';
     2  
     3  export default Serializer.extend({
     4    // this could get confusing if you tried to override
     5    // say `normalizeQueryResponse`
     6    // TODO: consider creating a method for each one of the `normalize...Response` family
     7    normalizeResponse: function(store, primaryModelClass, payload, id, requestType) {
     8      return this._super(
     9        store,
    10        primaryModelClass,
    11        {
    12          [primaryModelClass.modelName]: this.normalizePayload(payload, id, requestType),
    13        },
    14        id,
    15        requestType
    16      );
    17    },
    18    normalizePayload: function(payload, id, requestType) {
    19      return payload;
    20    },
    21  });