Remove next link when there aren't any introductions in Module\Api\Mastodon\FollowRequests
This commit is contained in:
parent
24abdaf64f
commit
7033cdcd6b
1 changed files with 4 additions and 1 deletions
|
@ -106,7 +106,10 @@ class FollowRequests extends BaseApi
|
|||
if ($introductions->getTotalCount() > $limit) {
|
||||
$links[] = '<' . $baseUrl->get() . '/api/v1/follow_requests?' . http_build_query($base_query + ['max_id' => $introductions[count($introductions) - 1]->id]) . '>; rel="next"';
|
||||
}
|
||||
|
||||
if (count($introductions)) {
|
||||
$links[] = '<' . $baseUrl->get() . '/api/v1/follow_requests?' . http_build_query($base_query + ['since_id' => $introductions[0]->id]) . '>; rel="prev"';
|
||||
}
|
||||
|
||||
header('Link: ' . implode(', ', $links));
|
||||
|
||||
|
|
Loading…
Reference in a new issue