Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Usage endpoints #47

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Feature: Usage endpoints #47

wants to merge 4 commits into from

Conversation

MilGard91
Copy link
Contributor

Context

Issue: #38

Changes proposed in this pull request

Add usage routes and usageEngine that will return used capacity of a pool by product

@MilGard91 MilGard91 requested a review from shark0der July 21, 2023 08:05
@roxdanila roxdanila linked an issue Jul 24, 2023 that may be closed by this pull request
src/lib/usageEngine.js Outdated Show resolved Hide resolved
src/lib/usageEngine.js Outdated Show resolved Hide resolved
const newProductIds = [...new Set([...previousProductIds, productId])];
const poolProductIds = { ...state.poolProductIds, [poolId]: newProductIds };

return { ...state, poolProducts, productPoolIds, poolProductIds };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed: remove productPoolIds and poolProductIds to remove redundancy and create selectors instead

@MilGard91 MilGard91 force-pushed the feature/pool-endpoints branch from 1c4a1d7 to 67bfe36 Compare August 23, 2023 06:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cover router should expose used capacity per pool, per product
2 participants