Skip to content

Commit

Permalink
fix updateQuery method on projections manager
Browse files Browse the repository at this point in the history
  • Loading branch information
prolic committed Nov 23, 2019
1 parent 69e04d1 commit 811fdf8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/Projections/ProjectionsClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -467,14 +467,14 @@ public function updateQuery(
EndPoint $endPoint,
string $name,
string $query,
bool $emitEnabled = null,
?bool $emitEnabled = null,
?UserCredentials $userCredentials = null,
string $httpSchema = EndpointExtensions::HTTP_SCHEMA
): Promise {
if (null === $emitEnabled) {
$url = '/projection/%s/query';
} else {
$url = '/projection/%s/query?emit=' . (int) $emitEnabled;
$url = '/projection/%s/query';

if (null !== $emitEnabled) {
$url .= '?emit=' . (int) $emitEnabled;
}

return $this->sendPut(
Expand Down
2 changes: 1 addition & 1 deletion src/Projections/ProjectionsManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ public function getQueryAsync(string $name, ?UserCredentials $userCredentials =
public function updateQueryAsync(
string $name,
string $query,
bool $emitEnabled = null,
?bool $emitEnabled = null,
?UserCredentials $userCredentials = null
): Promise {
if ('' === $name) {
Expand Down

0 comments on commit 811fdf8

Please sign in to comment.