2018-08-16 13:16:24 +00:00
|
|
|
import ApplicationSerializer from './application';
|
2018-04-03 14:16:57 +00:00
|
|
|
|
2018-08-16 13:16:24 +00:00
|
|
|
export default ApplicationSerializer.extend({
|
2018-04-03 14:16:57 +00:00
|
|
|
primaryKey: 'path',
|
|
|
|
|
|
|
|
normalizeResponse(store, primaryModelClass, payload, id, requestType) {
|
|
|
|
// queryRecord will already have set this, and we won't have an id here
|
|
|
|
if (id) {
|
|
|
|
payload.path = id;
|
|
|
|
}
|
2022-11-09 23:15:31 +00:00
|
|
|
const response = {
|
2018-08-16 13:16:24 +00:00
|
|
|
...payload.data,
|
|
|
|
path: payload.path,
|
2018-04-03 14:16:57 +00:00
|
|
|
};
|
|
|
|
return this._super(store, primaryModelClass, response, id, requestType);
|
|
|
|
},
|
|
|
|
|
|
|
|
modelNameFromPayloadKey() {
|
|
|
|
return 'capabilities';
|
|
|
|
},
|
|
|
|
});
|