Skip to content

Commit

Permalink
refactor: (BREAKING) remove group from deployment + return object in …
Browse files Browse the repository at this point in the history
…getAll with groups
  • Loading branch information
Looskie committed Oct 16, 2023
1 parent 14dd558 commit e90534a
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/sdks/ignite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -572,15 +572,10 @@ export const ignite = sdk(client => {
projectId ? {project: projectId} : {},
);

const groupRecord = groups.reduce((acc, group) => {
acc[group.id] = group;
return acc;
}, {} as Record<Group['id'], Group>);

return deployments.map(Deployments.from).map(deployment => ({
...deployment,
group: deployment.group_id ? groupRecord[deployment.group_id] : null,
}));
return {
deployments: deployments.map(Deployments.from),
groups,
};
},

/**
Expand Down

0 comments on commit e90534a

Please sign in to comment.