segler-alex / radiobrowser-api-rust

radio-browser API implementation in rust
GNU Affero General Public License v3.0
227 stars 97 forks source link

Country parameter in states search doesn't work #197

Closed josago97 closed 10 months ago

josago97 commented 1 year ago

Hi, I am trying to get the states belonging to a country, but it seems that the server is not working correctly. We are supposed to have the following options: http://95.179.139.106/json/states http://95.179.139.106/json/states/{filter} http://95.179.139.106/json/states/{country}/{filter}

Focusing on the last two, let's say I want to get information about the state of California from the country of Mexico.

When making the request http://95.179.139.106/json/states/california we get the state of Califnornia from both Mexico and the United States, this is what is expected.

However, if we use either of these two requests: http://95.179.139.106/json/states/mx/california http://95.179.139.106/json/states/mexico/california We get an empty collection.

Finally if we introduce the country parameter by the url: http://95.179.139.106/json/states/california?country=mx http://95.179.139.106/json/states/california?country=mexico We again obtain the same results as in the first test, the state of California, both in Mexico and in the United States. We would have to get only the state of Mexico...