23 lines
497 B
JavaScript
23 lines
497 B
JavaScript
|
import ApplicationSerializer from './application';
|
||
|
|
||
|
export default ApplicationSerializer.extend({
|
||
|
attrs: {
|
||
|
httpAddr: 'HTTPAddr',
|
||
|
},
|
||
|
|
||
|
extractRelationships(modelClass, hash) {
|
||
|
const { modelName } = modelClass;
|
||
|
const nodeURL = this.store
|
||
|
.adapterFor(modelName)
|
||
|
.buildURL(modelName, this.extractId(modelClass, hash), hash, 'findRecord');
|
||
|
|
||
|
return {
|
||
|
allocations: {
|
||
|
links: {
|
||
|
related: `${nodeURL}/allocations`,
|
||
|
},
|
||
|
},
|
||
|
};
|
||
|
},
|
||
|
});
|