2019-03-26 04:55:06 +00:00
|
|
|
import { copy } from 'ember-copy';
|
2017-10-13 22:17:51 +00:00
|
|
|
import ApplicationSerializer from './application';
|
|
|
|
|
2020-06-11 21:23:00 +00:00
|
|
|
export default class TokenSerializer extends ApplicationSerializer {
|
|
|
|
primaryKey = 'AccessorID';
|
2017-10-13 22:17:51 +00:00
|
|
|
|
2020-06-11 21:23:00 +00:00
|
|
|
attrs = {
|
2017-10-13 22:17:51 +00:00
|
|
|
secret: 'SecretID',
|
2020-06-11 21:23:00 +00:00
|
|
|
};
|
2017-10-13 22:17:51 +00:00
|
|
|
|
|
|
|
normalize(typeHash, hash) {
|
|
|
|
hash.PolicyIDs = hash.Policies;
|
|
|
|
hash.PolicyNames = copy(hash.Policies);
|
2020-06-11 21:23:00 +00:00
|
|
|
return super.normalize(typeHash, hash);
|
|
|
|
}
|
|
|
|
}
|