open-vault/ui/app/serializers/clients/version-history.js
Angel Garbarino 10e0c1d537
Client counts version-history endpoint (#13907)
* setup

* add catch for when no payload

* clean up

* pr comments

* wip

* finish findAll fixes

* clean up

* remove console log
2022-02-08 11:12:23 -07:00

12 lines
420 B
JavaScript

import ApplicationSerializer from '../application';
export default ApplicationSerializer.extend({
normalizeFindAllResponse(store, primaryModelClass, payload, id, requestType) {
let normalizedPayload = [];
payload.keys.forEach((key) => {
normalizedPayload.push({ id: key, ...payload.key_info[key] });
});
return this._super(store, primaryModelClass, normalizedPayload, id, requestType);
},
});