REST API - getLinks: support the visibility parameter
This commit is contained in:
parent
89dcbe5277
commit
c37a6f820b
2 changed files with 24 additions and 31 deletions
application/api/controllers
|
@ -34,15 +34,14 @@ class Links extends ApiController
|
|||
*/
|
||||
public function getLinks($request, $response)
|
||||
{
|
||||
$private = $request->getParam('private');
|
||||
$private = $request->getParam('visibility');
|
||||
$links = $this->linkDb->filterSearch(
|
||||
[
|
||||
'searchtags' => $request->getParam('searchtags', ''),
|
||||
'searchterm' => $request->getParam('searchterm', ''),
|
||||
],
|
||||
false,
|
||||
// to updated in another PR depending on the API doc
|
||||
($private === 'true' || $private === '1') ? 'private' : 'all'
|
||||
$private
|
||||
);
|
||||
|
||||
// Return links from the {offset}th link, starting from 0.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue