mysociety / popit-api

DEPRECATED - Development on PopIt has stopped and it is no longer being maintained
https://goo.gl/Vvej4Q
Other
17 stars 3 forks source link

"next_url" field on collections doesn't retain url arguments #110

Closed tfgg closed 9 years ago

tfgg commented 9 years ago

(I've moved https://github.com/mysociety/popit/issues/711 to this repo, seems more appropriate here)

E.g. on

https://yournextmp.popit.mysociety.org/api/v0.1/posts?embed=membership.person

the "next_url" field is

https://yournextmp.popit.mysociety.org/api/v0.1/posts?page=2

personally, I would expect it to be

https://yournextmp.popit.mysociety.org/api/v0.1/posts?page=2&embed=membership.person

https://github.com/mysociety/yournextmp-popit/issues/150 is also related.

chrismytton commented 9 years ago

@tfgg Ah thanks for this, we changed the code so it didn't preserve arbitrary parameters in https://github.com/mysociety/popit-api/pull/78 because of the issues it was causing, reported in https://github.com/mysociety/popit-api/issues/69. However we've since added the embed parameter so we should probably add that to the list of parameters that are explicitly preserved.

tfgg commented 9 years ago

@andylolz also reports in https://github.com/mysociety/yournextmp-popit/issues/150 that the "q" param isn't being preserved when he was expecting it to be. Cheers.