You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 4, 2024. It is now read-only.
We seem to call getAppealsList in the appeals-table component where we don't need to and it should be trivial to move to properly paginated API calls :
This is likely going to be a bit more work since the presentation dash currently needs all appeals to figure out what to display on the map - not sure if this can be helped by creating an endpoint that aggregates by country or so.
This might not be urgent since I see we still receive a total of 66 appeals from the backend, but it is something we should fix since we don't want to allow calls to the API with that high a limit. Perhaps an alternative would be to just use paginated requests as elsewhere to break up the request into multiple chunks.
We currently call the
getAppealsList
action in a few places on the frontend. This makes a call to the Appeals API with limit=1000: https://github.com/IFRCGo/go-frontend/blob/develop/src/root/actions/index.js#L232We seem to call
getAppealsList
in the appeals-table component where we don't need to and it should be trivial to move to properly paginated API calls :appeals-table
: https://github.com/IFRCGo/go-frontend/blob/develop/src/root/components/connected/appeals-table.js#L346 - we should be able to remove this and only make paginated calls togetAppeals
: https://github.com/IFRCGo/go-frontend/blob/develop/src/root/actions/index.js#L537.The one that seems a bit more work to remove is the call inside the
presentation-dash
component: https://github.com/IFRCGo/go-frontend/blob/develop/src/root/components/connected/presentation-dash.js#L8This is likely going to be a bit more work since the presentation dash currently needs all appeals to figure out what to display on the map - not sure if this can be helped by creating an endpoint that aggregates by country or so.
This might not be urgent since I see we still receive a total of 66 appeals from the backend, but it is something we should fix since we don't want to allow calls to the API with that high a limit. Perhaps an alternative would be to just use paginated requests as elsewhere to break up the request into multiple chunks.
Would be good to tackle at some point.
cc @tovari
The text was updated successfully, but these errors were encountered: