disease-sh/node-api

sort by key not working for countries method

godwin-l opened this issue · 1 comments

This is the code snippet i have used for accessing countries method with sort by key

exports.getTest = (req, res) => {
    (async() => {
        sortedCountries = await covid.countries('cases', 'sort by');
        res.send(sortedCountries);
    })();
}

Screenshot from 2020-04-16 21-23-55

But it returns that country not found.
I think there is some collision between sort and get specific country methods.

sorry for the inconvinience, .countries(null, 'cases') worked for me