Skip to content

Commit

Permalink
Cat/Snapshots 'repository' param is not in-fact required, despite spec
Browse files Browse the repository at this point in the history
  • Loading branch information
polyfractal committed Oct 25, 2016
1 parent 87f23a1 commit 6c77f62
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/Elasticsearch/Endpoints/Cat/Snapshots.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,12 @@ public function setRepository($repository)
*/
public function getURI()
{
if (isset($this->repository) !== true) {
throw new RuntimeException(
'repository is required for Cat Snapshots '
);
}
$repository = $this->repository;
$uri = "/_cat/snapshots/$repository/";
return $uri;
if (isset($this->repository) === true) {
return "/_cat/snapshots/$repository/";
}

return "/_cat/snapshots/";
}

/**
Expand Down

0 comments on commit 6c77f62

Please sign in to comment.