Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.x ApiPaginationListener not responding to direction parameter #247

Closed
bravo-kernel opened this issue Feb 16, 2015 · 4 comments
Closed
Milestone

Comments

@bravo-kernel
Copy link
Contributor

The ApiPaginationListener is responding to the direction query string parameter. E.g.

api.local?direction=asc 

Additional info:

  • I have whitelisted the action just as limit, sort and page which do work as expected (all three)
  • I have tested with option order as well
  • using latest Cake 3.x and CRUD

Am I missing something here?

@ADmad
Copy link
Member

ADmad commented Feb 16, 2015

Have you tried whitelisting direction too?

@ADmad ADmad added this to the NEXT milestone Feb 16, 2015
@bravo-kernel
Copy link
Contributor Author

Yes I did and maybe not worded clearly but limit, sort and page are in the same whitelist array and function as expected.

@ADmad
Copy link
Member

ADmad commented Feb 16, 2015

Just api.local?direction=asc isn't going to work, it needs field name too eg. api.local?sort=some_field&direction=asc

@bravo-kernel
Copy link
Contributor Author

Damn, my bad. I somehow thought it "just" worked in 2.x.

Thanks for clarifying, sorry for disturbing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants