Currently I calculate days difference on the frontend. I want to move this to the backend. The route needs to handle all states/countries in one GET.
There can also be a choice of how many days difference to get. For example we could get the difference in the last day for each state/country or we could get the difference in the last 7 days for each state/country.
One option: this would move all calculation to the BE which would be nice and fast
parameters sent to backend: State/Country object, days difference, property name(maybe, will start by just doing active)
State/Country object: This would come in as a LinkedHashMap(to keep order) that would look like this
Currently I calculate days difference on the frontend. I want to move this to the backend. The route needs to handle all states/countries in one GET.
There can also be a choice of how many days difference to get. For example we could get the difference in the last day for each state/country or we could get the difference in the last 7 days for each state/country.
One option: this would move all calculation to the BE which would be nice and fast
Another easier option: This would keep calculations on the FE, but the network data should still be pretty small.
daysDifference
away