mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-09 16:24:51 +00:00
Merge pull request #1766 from pixelfed/staging
Update ApiController, fixes #1764
This commit is contained in:
commit
a7128839a8
1 changed files with 2 additions and 6 deletions
|
@ -1447,9 +1447,7 @@ class ApiV1Controller extends Controller
|
|||
$prev = $page > 1 ? $page - 1 : 1;
|
||||
$links = '<'.$url.'?page='.$next.'&limit='.$limit.'>; rel="next", <'.$url.'?page='.$prev.'&limit='.$limit.'>; rel="prev"';
|
||||
|
||||
return response()
|
||||
->header('Link', $links)
|
||||
->json($res);
|
||||
return response()->json($res, 200, ['Link' => $links]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1480,9 +1478,7 @@ class ApiV1Controller extends Controller
|
|||
$prev = $page > 1 ? $page - 1 : 1;
|
||||
$links = '<'.$url.'?page='.$next.'&limit='.$limit.'>; rel="next", <'.$url.'?page='.$prev.'&limit='.$limit.'>; rel="prev"';
|
||||
|
||||
return response()
|
||||
->header('Link', $links)
|
||||
->json($res);
|
||||
return response()->json($res, 200, ['Link' => $links]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue