-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Make React frontend capable of reading API results under a results key #4159
Conversation
return api.get(apiPath(site, '/countries'), query, {limit: 9}).then((res) => { | ||
return res.map(row => Object.assign({}, row, {percentage: undefined})) | ||
}) | ||
return api.get(apiPath(site, '/countries'), query, { limit: 9 }) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add length key back Co-authored-by: Adrian Gruntkowski <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a plan to clean up the fallbacks once backend changes are done as well? I'm asking because IMO it doesn't make sense to keep accepting multiple different response formats when we know for sure what is being returned from internal APIs.
Yes, @ukutaht. The PR that implements filtering will remove it so we'll start relying only on the results key. |
Changes
With the new imported data filtering feature, we'll start returning warnings in the dashboard API results, which means we'll need to move the actual list of results under a separate
results
key.This PR is a preparation in order to not break the frontend when suddenly receiving API results under a
results
key. For some time, we'll need to be able to handle both a straight-up list response, or a map, containing theresults
key.Tests
Changelog
Documentation
Dark mode