getCovidData should try to return some data
marekaf opened this issue · 0 comments
marekaf commented
The problem is when somebody is fetching the data before 3am as they might get an empty response. We should rather provide stale data than none at all.
when date is not explicitly provided in input, we should try to return data from TODAY
. If data for TODAY
is missing, try to get data for YESTERDAY
, if those are missing too, return empty response.
when date is explicitly set in input, try to look them up and return empty response if they are missing. So no changes here.
Add date
to response so the client can see which kind of data are they getting.
cc @Gh0stahCZ