drahak / Restful

Drahak\Restful - Nette REST API bundle
0 stars 0 forks source link

Response factory changes current page when generating links #140

Open jkavalik opened 5 years ago

jkavalik commented 5 years ago

ResponseFactory::getNextPageUrl() changes the current page, so we are getting wrong results by using the paginator.

Either it should change the page back, or use a clone of the paginator.

Moreover - when used with Nette, the response gets created too early, so the total count cannot be properly set - and it means throwing and swallowing at least one exception on each request where at least one of limit/offset query params is not set.