mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
feat: parse collection list
This commit is contained in:
@@ -25,6 +25,10 @@ class V06 extends Filter {
|
||||
$parsedResponse = $this->parseCollection($content);
|
||||
break;
|
||||
|
||||
case Response::MODEL_COLLECTION_LIST:
|
||||
$parsedResponse = $this->parseCollectionList($content);
|
||||
break;
|
||||
|
||||
case Response::MODEL_FILE :
|
||||
$parsedResponse = $this->parseFile($content);
|
||||
break;
|
||||
@@ -104,6 +108,14 @@ class V06 extends Filter {
|
||||
return $parsedResponse;
|
||||
}
|
||||
|
||||
private function parseCollectionList(array $content)
|
||||
{
|
||||
foreach($content['collections'] as $key => $collection){
|
||||
$content['collections'][$key] = $this->parseCollection($collection);
|
||||
}
|
||||
return $content;
|
||||
}
|
||||
|
||||
private function parseCollection(array $content)
|
||||
{
|
||||
$content['$collection'] = Database::SYSTEM_COLLECTION_COLLECTIONS;
|
||||
|
||||
Reference in New Issue
Block a user