Fetch chargers across all pages and one charger by id#43
Merged
Conversation
GET /api/chargers is paginated; reading only the first page silently hid every charger beyond it on accounts with more than one page, which left those chargers unresolvable for callers matching on the listing.
Resolving one charge point's model only needs its own charger data; fetching it directly avoids walking the paginated account-wide listing for every lookup.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
client.chargerslas alleen pagina 1 van het gepagineerdeGET /api/chargers. Op het gedeelde Stekker-account (139+ chargers) was daardoor alles buiten de eerste pagina onvindbaar — in StekkerWeb bleven zo 65 ERE-laders zonder gekoppeld catalogusmodel, omdatResolveChargePointModelJobhun charger simpelweg nooit in de listing zag (stille no-op, geen fouten in Sentry).Twee wijzigingen:
chargersloopt nu alle pagina's af (PageIndex/PageSize=100, tot hetPages-veld uit de response bereikt is).charger(id)viaGET /api/chargers/{id}, zodat een caller die maar één lader nodig heeft (zoals de model-resolve in StekkerWeb) niet per lookup de hele account-listing hoeft te doorlopen.Volgt op stekker/stekker#8228; de StekkerWeb-kant (resolve via
charger(id)+ gem-bump) komt in een aparte PR zodra dit gemerged is.