open-vault/ui/app/serializers/transform/role.js

16 lines
344 B
JavaScript
Raw Normal View History

import ApplicationSerializer from '../application';
export default ApplicationSerializer.extend({
extractLazyPaginatedData(payload) {
return payload.data.keys.map((key) => {
const model = {
id: key,
};
if (payload.backend) {
model.backend = payload.backend;
}
return model;
});
},
});