mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
19 lines
440 B
JavaScript
19 lines
440 B
JavaScript
import ApplicationSerializer from './application';
|
|
import classic from 'ember-classic-decorator';
|
|
|
|
@classic
|
|
export default class PolicySerializer extends ApplicationSerializer {
|
|
primaryKey = 'Name';
|
|
|
|
normalize(typeHash, hash) {
|
|
hash.ID = hash.Name;
|
|
return super.normalize(typeHash, hash);
|
|
}
|
|
|
|
serialize(snapshot, options) {
|
|
const hash = super.serialize(snapshot, options);
|
|
hash.ID = hash.Name;
|
|
return hash;
|
|
}
|
|
}
|