import ApplicationSerializer from '../application';

export default ApplicationSerializer.extend({

  modelNameFromPayloadKey(key) {
    return key;
  },

  normalizeSingleResponse(store, primaryModelClass, payload, id, requestType) {
    delete payload.channel;

    payload = {
      data: {
        id,
        type: 'video-stats/channel-lifetime',
        attributes: payload
      }
    };

    return this._super(store, primaryModelClass, payload, id, requestType);
  }
});
