forked from mirror/pixelfed
Update ApiController, fixes #1764
This commit is contained in:
parent
fdac53eb77
commit
1346b75887
1 changed files with 2 additions and 6 deletions
|
@ -1447,9 +1447,7 @@ class ApiV1Controller extends Controller
|
||||||
$prev = $page > 1 ? $page - 1 : 1;
|
$prev = $page > 1 ? $page - 1 : 1;
|
||||||
$links = '<'.$url.'?page='.$next.'&limit='.$limit.'>; rel="next", <'.$url.'?page='.$prev.'&limit='.$limit.'>; rel="prev"';
|
$links = '<'.$url.'?page='.$next.'&limit='.$limit.'>; rel="next", <'.$url.'?page='.$prev.'&limit='.$limit.'>; rel="prev"';
|
||||||
|
|
||||||
return response()
|
return response()->json($res, 200, ['Link' => $links]);
|
||||||
->header('Link', $links)
|
|
||||||
->json($res);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1480,9 +1478,7 @@ class ApiV1Controller extends Controller
|
||||||
$prev = $page > 1 ? $page - 1 : 1;
|
$prev = $page > 1 ? $page - 1 : 1;
|
||||||
$links = '<'.$url.'?page='.$next.'&limit='.$limit.'>; rel="next", <'.$url.'?page='.$prev.'&limit='.$limit.'>; rel="prev"';
|
$links = '<'.$url.'?page='.$next.'&limit='.$limit.'>; rel="next", <'.$url.'?page='.$prev.'&limit='.$limit.'>; rel="prev"';
|
||||||
|
|
||||||
return response()
|
return response()->json($res, 200, ['Link' => $links]);
|
||||||
->header('Link', $links)
|
|
||||||
->json($res);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue