open-nomad/ui/app/serializers/token.js
2019-04-10 14:54:35 -07:00

17 lines
362 B
JavaScript

import { copy } from 'ember-copy';
import ApplicationSerializer from './application';
export default ApplicationSerializer.extend({
primaryKey: 'AccessorID',
attrs: {
secret: 'SecretID',
},
normalize(typeHash, hash) {
hash.PolicyIDs = hash.Policies;
hash.PolicyNames = copy(hash.Policies);
return this._super(typeHash, hash);
},
});