Skip to content

Commit 6c193f4

Browse files
authored
Merge pull request #9522 from appwrite/fix-frameworks-response
Fix: Response model for framework (adapters)
2 parents f1b5807 + 23b245e commit 6c193f4

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

src/Appwrite/Platform/Modules/Sites/Http/Frameworks/XList.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ public function action(Response $response)
5252
{
5353
$frameworks = Config::getParam('frameworks');
5454

55+
foreach ($frameworks as $key => $framework) {
56+
if (!empty($framework['adapters'])) {
57+
$frameworks[$key]['adapters'] = \array_values($framework['adapters']);
58+
}
59+
}
60+
5561
$response->dynamic(new Document([
5662
'total' => count($frameworks),
5763
'frameworks' => \array_values($frameworks)

tests/e2e/Services/Sites/SitesCustomServerTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1364,6 +1364,11 @@ public function testGetFrameworks(): void
13641364
$this->assertArrayHasKey('buildRuntime', $framework);
13651365
$this->assertArrayHasKey('runtimes', $framework);
13661366
$this->assertArrayHasKey('adapters', $framework);
1367+
$this->assertIsArray($framework['adapters']);
1368+
$this->assertArrayHasKey('key', $framework['adapters'][0]);
1369+
$this->assertArrayHasKey('installCommand', $framework['adapters'][0]);
1370+
$this->assertArrayHasKey('buildCommand', $framework['adapters'][0]);
1371+
$this->assertArrayHasKey('outputDirectory', $framework['adapters'][0]);
13671372
}
13681373

13691374
public function testSiteStatic(): void

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy