mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
fix projects filters
This commit is contained in:
@@ -170,9 +170,7 @@ class XList extends Action
|
||||
|
||||
$selectedAttributes = [];
|
||||
foreach ($selectQueries as $query) {
|
||||
foreach ($query->getValues() as $value) {
|
||||
$selectedAttributes[] = $value;
|
||||
}
|
||||
$selectedAttributes[] = $query->getAttribute();
|
||||
}
|
||||
|
||||
if (\in_array('*', $selectedAttributes)) {
|
||||
|
||||
@@ -20,12 +20,11 @@ class ListSelection extends Filter
|
||||
|
||||
$selections = [];
|
||||
foreach ($this->selectQueries as $query) {
|
||||
foreach ($query->getValues() as $value) {
|
||||
if ($value === '*') {
|
||||
return $content;
|
||||
}
|
||||
$selections[$value] = true;
|
||||
if ($query->getAttribute() === '*') {
|
||||
return $content;
|
||||
}
|
||||
|
||||
$selections[$query->getAttribute()] = true;
|
||||
}
|
||||
|
||||
return $this->handleList($content, $this->itemsKey, function (array $item) use ($selections) {
|
||||
|
||||
@@ -481,7 +481,7 @@ class ProjectsConsoleClientTest extends Scope
|
||||
$this->assertEquals(200, $response['headers']['status-code']);
|
||||
$this->assertNotEmpty($response['body']);
|
||||
$this->assertGreaterThan(0, count($response['body']['projects']));
|
||||
|
||||
var_dump($response);
|
||||
$project = $response['body']['projects'][0];
|
||||
$this->assertArrayHasKey('$id', $project);
|
||||
$this->assertArrayHasKey('name', $project);
|
||||
|
||||
Reference in New Issue
Block a user