Skip to content

Commit 85bf3e4

Browse files
committed
fixed sorting bug in source 2
1 parent fd4ad7a commit 85bf3e4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/api.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ exports.getCoronaData = async () => {
2222
const cache = myCache.get(CORONA_ALL_KEY);
2323

2424
if (cache) {
25+
console.log('cache', CORONA_ALL_KEY);
2526
return cache;
2627
}
2728
const result = await axios('https://coronavirus-tracker-api.herokuapp.com/all');
@@ -47,7 +48,7 @@ exports.getWorldoMetersData = async (countryCode = 'ALL') => {
4748
console.log('cache', key);
4849
return cache;
4950
}
50-
const result = await axios('https://corona.lmao.ninja/countries');
51+
const result = await axios('https://corona.lmao.ninja/countries?sort=cases');
5152
if (!result || !result.data) {
5253
throw new Error('WorldoMeters Source API failure');
5354
}

0 commit comments

Comments
 (0)