API: do not set rel="next" pagination header when no records found
What does this MR do?
When there are no records found, there is no next page, so the Link
header of the API response should not set the rel="next"
.
The fix was implemented as suggested in https://github.com/kaminari/kaminari/pull/877#issuecomment-288099591.
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary - [-] Documentation created/updated
-
API support added -
Tests added for this feature/bug - Review
- [-] Has been reviewed by UX
- [-] Has been reviewed by Frontend
-
Has been reviewed by Backend - [-] Has been reviewed by Database
-
Conform by the merge request performance guides -
Conform by the style guides -
Squashed related commits together
What are the relevant issue numbers?
Fixes gitlab-org/gitlab-ce#36618
Related to gitlab-com/infrastructure#2532 (closed)
Edited by Toon Claes