gbv / coli-ana

API to analyze DDC numbers
https://coli-conc.gbv.de/coli-ana/app/
MIT License
2 stars 0 forks source link

Invalid response when no notations is supplied #66

Closed nichtich closed 2 years ago

nichtich commented 2 years ago
curl https://coli-conc.gbv.de/coli-ana/dev/analyze
[object Object]
stefandesu commented 2 years ago

I'm confused. First of all, if I try the same locally, I get a proper JSON response. Looking at the code, it seems like it was changed so that if no notation parameter is given, it does a member lookup (something that we removed from the interface some time ago), and if search is also not given (which is used by the lookup), it will just return the first X results from the database.

I don't know why it's different locally on my machine, and I also don't know if we still need the lookup functionality. What we could do is to only run the lookup if notation is empty and search is not empty.

nichtich commented 2 years ago

I have not looked at the code but in any case we can fully remove member lookup.

stefandesu commented 2 years ago

curl https://coli-conc.gbv.de/coli-ana/dev/analyze will now return an empty array.