github.com/ferranbt/nomad@v0.9.3-0.20190607002617-85c449b7667c/ui/app/serializers/token.js (about) 1 import { copy } from 'ember-copy'; 2 import ApplicationSerializer from './application'; 3 4 export default ApplicationSerializer.extend({ 5 primaryKey: 'AccessorID', 6 7 attrs: { 8 secret: 'SecretID', 9 }, 10 11 normalize(typeHash, hash) { 12 hash.PolicyIDs = hash.Policies; 13 hash.PolicyNames = copy(hash.Policies); 14 return this._super(typeHash, hash); 15 }, 16 });