open-nomad/ui/app/serializers/token.js
Buck Doyle cd11cd290c Add manually-converted classes
I don’t know why the codemod ignored these files 🧐
2020-06-15 10:14:26 -05:00

17 lines
388 B
JavaScript

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