Skip to content

Commit

Permalink
Update filter criteria (owned)
Browse files Browse the repository at this point in the history
  • Loading branch information
lbacik committed Dec 28, 2024
1 parent 852c808 commit 8a4c6e6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/SDK/Client/Mapper/EntityMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function mapArray(array $data): object
$this->definitionMapper->mapArray($data['definition']),
$parent ? $this->mapArray($parent) : null,
$data['private'] ?? false,
$data['owned'] ?? false,
$data['isOwnedByCurrentUser'] ?? false,
);
}

Expand Down
2 changes: 2 additions & 0 deletions src/SDK/FilterCriteria.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public function __construct(
public readonly string|null $parentUuid = null,
public readonly string|null $slugSearchTerm = null,
public readonly string|null $dataSearchTerm = null,
public readonly bool|null $isOwnedByCurrentUser = null,
) {
}

Expand All @@ -26,6 +27,7 @@ public function generateQueryString(): string
$this->parentUuid && $queryParamsArray['parent'] = $this->parentUuid;
$this->slugSearchTerm && $queryParamsArray['slug'] = $this->slugSearchTerm;
$this->dataSearchTerm && $queryParamsArray['data'] = $this->dataSearchTerm;
$this->isOwnedByCurrentUser && $queryParamsArray['owned'] = $this->isOwnedByCurrentUser;

return http_build_query($queryParamsArray);
}
Expand Down

0 comments on commit 8a4c6e6

Please sign in to comment.