github.com/blixtra/nomad@v0.7.2-0.20171221000451-da9a1d7bb050/ui/app/serializers/token.js (about)

     1  import Ember from 'ember';
     2  import ApplicationSerializer from './application';
     3  
     4  const { copy } = Ember;
     5  
     6  export default ApplicationSerializer.extend({
     7    primaryKey: 'AccessorID',
     8  
     9    attrs: {
    10      secret: 'SecretID',
    11    },
    12  
    13    normalize(typeHash, hash) {
    14      hash.PolicyIDs = hash.Policies;
    15      hash.PolicyNames = copy(hash.Policies);
    16      return this._super(typeHash, hash);
    17    },
    18  });