punkish / zenodeo

`nodejs` interface to Zenodo/BLR community
https://zenodeo.org
Creative Commons Zero v1.0 Universal
6 stars 1 forks source link

Sort options not quite working #48

Closed punkish closed 4 years ago

punkish commented 4 years ago

started by @teodorgeorgiev (see https://github.com/pensoft/BLR-react-website/issues/3)

the API returns the same response. @punkish could you please check this: ASC https://zenodeo.org/v2/treatments?authorityName=Agosti&xml=false&sortBy=treatmentTitle%3AASC&refreshCache=false&page=1&size=30&facets=true&stats=false DESC https://zenodeo.org/v2/treatments?authorityName=Agosti&xml=false&sortBy=treatmentTitle%3ADESC&refreshCache=false&page=1&size=30&facets=true&stats=false

punkish commented 4 years ago

yes, that is because I have implemented the mechanism but not activated the sorting on different columns other than journalYear. Because of possible SQL injection attacks, I need to know which columns you want to enable for sorting. I will add treatmentTitle to be sortable but if you need any other, please tell me now.

Note that this is true for all the resources. That is, server-side sort will be enabled only for the columns you specify to me in advance (and please don't respond with "all of them" 😉).

cc @howkins @mguidoti @teodorgeorgiev

punkish commented 4 years ago

I haven't heard back from you @teodorgeorgiev so I've gone ahead and added sorting by treatmentTitle and am closing this issue.