disease-sh/node-api

.countries(null, 'sort by'); Is not working

Closed this issue · 4 comments

I have the following code

app.get('/countries', async (req, res) => {
	const { sort } = req.query;
	let countries;
	if (sort) {
		countries = await track.countries();
	} else {
		countries = await track.countries(null, sort);
	}
	res.send(countries);
});

But the answer is always the same, even if I send the sort parameter

image

the sort by sorts according to cases, todayCases , deaths, todayDeaths , etc ... not by by country names

Why these methods are not working suddenly? It was working before

Just got the issue , pushing changes soon!

Fixed it! in the new release , reopen if the issue continues