52fe56ec87
* adds prefer-const to eslint config and runs fixer * reverts unintended change
21 lines
536 B
JavaScript
21 lines
536 B
JavaScript
import ApplicationSerializer from '../application';
|
|
|
|
export default ApplicationSerializer.extend({
|
|
normalizeResponse(store, primaryModelClass, payload, id, requestType) {
|
|
payload.data.name = payload.id;
|
|
return this._super(store, primaryModelClass, payload, id, requestType);
|
|
},
|
|
|
|
extractLazyPaginatedData(payload) {
|
|
return payload.data.keys.map((key) => {
|
|
const model = {
|
|
id: key,
|
|
};
|
|
if (payload.backend) {
|
|
model.backend = payload.backend;
|
|
}
|
|
return model;
|
|
});
|
|
},
|
|
});
|